Radar Charts - don't always display a fixed 5 grid lines #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently used your library to create a radar chart, where each max value for the indicators was 6. Since round_count was set to a fixed 5 value, it resulted in each point being somewhat off from the line, even though I was only using values 0-6.
So I instead tried my hand at changing the calculations, so that (based on the maximum "max value" of all indicators), I try to find the maximum number of grid lines between 2 and 10, that are evenly divisible by the max I calculated.
So in my case, I would get 6 lines (6 is maximally evenly divisible by 6). If you had something like 1500, it would end up being 10, and so on. I left 5 as the fallback in case the calculation fails.
I did consider making it configurable, so if that's preferable, then I can try my hand at that.
If you don't see a benefit to this change, then that's fine too.
Any suggestions or requests are welcome!