Loilock
Posts: 1
Joined: Wed Nov 27, 2024 3:49 pm

Chart with dynamic data does not scale properly

We have a chart that adds historical data on the left when zooming out. The chart is prefilled with a range of data spanning 8 years in a low "resolution", only showing day data. The data that's displayed initially in the chart's viewport though has data for every minute.

When zooming out, the ratio of the chart gets a bit weird, I suspect it sees the lowest value from the coarse data since the minute data hasn't been requested yet. Is there a way to force the ratio of the chart?

https://www.youtube.com/watch?v=J8MEvxEjRY8
pawelys
Site Moderator
Posts: 1057
Joined: Wed Sep 02, 2020 10:37 am

Re: Chart with dynamic data does not scale properly

Hello Loilock, thanks for getting in touch.

The cause might be related to various factors that influence the calculation of the yAxis extremes. This calculation considers more than just the min and max values—it also takes into account the values' magnitude, tick interval, axis length in pixels, among others. Hence, pinpointing the exact cause could be challenging.

However, you could try adjusting some API options like tickAmount, tickInterval, tickPixelInterval, softMin, softMax, startOnTick, endOnTick. You can find a complete list in our API reference.

Unfortunately, without a live demo, further investigation of your use case is difficult. Feel free to let me know if this was helpful or if you need more assistance.
Paweł Lysy
Highcharts Developer

Return to “Highcharts Stock”