-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x number of minor ticks per major tick #13338
Comments
Hi @awall, We could parametrize this line: Lines 1484 to 1487 in f9dc90d
As a workaround, have you tried to use a minorTickInterval param? |
Thanks @sebastianbochan. In my case, the minorTickInterval does not work, it doesn't support logarithmic or date axes correctly (I've logged separate bugs for these issues already). |
It works for logarithmic (https://jsfiddle.net/BlackLabel/vem4q6yt/) but doesn't look good since the offset is critical. It works for datetime (https://jsfiddle.net/BlackLabel/vem4q6yt/1/) - the units are milliseconds. |
@KacperMadej Logarithmic only works for very specific numbers, try changing that "0.1" to "0.5" and see what happens ;). I've logged this bug already as #13337 As for datetime, I'd really like to use the default behaviour for the major ticks, and then just "2 minor ticks per major tick". If I use tickInterval and minorTickInterval, I need to write an enormous amount of tricky code involving dates and the chart width... this code is already built-in to how highcharts determines the major ticks on a date axis, and it is very painful to have to reverse engineer and duplicate that code. |
See plugin posted in #13336. Demo: https://jsfiddle.net/BlackLabel/oc70hqxm/ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
unstale |
Unstale — this is a pretty reasonable customization request. 5 minor ticks per major is very noisy / visually dense. Having the option to set the "auto" value would be much appreciated |
Thank you for your input @ReillyBova , I think we can get this done. We will do some internal discussions about how. |
After some internal discussion, we decided to add a new option highcharts/ts/Core/Axis/Axis.ts Line 1957 in 4800dec
My preliminary tests show that this works on linear, logarithmic and datetime axes. |
Awesome! Thank you! |
Description of the feature
When minorTicks is set to "auto", we get 5 minor ticks per major tick. Ideally, I would like to set the major ticks using other properties, like tickPixelInterval or tickAmount, and set the minor ticks as "2 minor ticks per major tick", or any other arbitrary multiple. Why restrict it to exactly 5?
Add some property to set this value from 5 to any arbitrary integer.
Please make sure it works in logarithmic and date axes, too!
Library related to the feature
Highcharts
You can vote for the feature by adding thumbs-up reaction for this post.
The text was updated successfully, but these errors were encountered: