-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Improving default ticks in Highstock Charts #20779
Comments
Thanks for writing!
|
Thanks @TorsteinHonsi, I am looking for ways here in which we can know that something is wrong so we can correct it or tell user to correct it by passing some options. More specifically if Highchart can tell before or after chart render that this is wrong and we can read that value to take next steps. For right label cut-off issue -
Is there a way or property we can read from chart before or after render to know this is happening, in this case we would update the chart with a right margin, otherwise not. For tick positioning and thresholdIs there a way to know that threshold has reached or no. of ticks will be very less - in this case we (user) can set ordinal to true. Or, are there any ways in which this algorithm could be improved to display more ticks. |
The only solution I can think of is that you create a chart load event, and in that event you check if the last x-axis label has an ellipsis. If it does => increase the right margin.
You could do the same here - attach a listener to chart load (or render), and adjust the axis layout. But beware that changing ordinal to true or false also affects the whole chart and the way the series is rendered. In general I would stick with the Highcharts defaults here, they usually work best. Maybe there is something that we can do with the tick layout in this particular case https://jsfiddle.net/rq1x9c8e/2 . |
This is caused by the default value of |
Description of the feature
Coming from this thread, we would like to request for feature where Highstock calculates best possible tick positions (we care more when ordinal is set to
True
), so that below issues are not there -False
.Library related to the feature
Highstock
The text was updated successfully, but these errors were encountered: