Page 1 of 1

Wrong values when changing zoom range

Posted: Wed Aug 10, 2022 11:18 am
by Mapantz
I'm experiencing a weird issue on one of my graphs. I am showing data at one minute intervals.. when I view the chart for the last 12 hours, the values are wrong when comparing them at 6 hours.

12 hour:

https://postimg.cc/F7RvvvFN

6 hour:

https://postimg.cc/4mz6XDW2

A friend who also has the same chart says it isn't happening to him, and that it shows the correct values no matter what zoom range. I've tried on several different browsers, and I still experience the same problem.

What could it be?

Re: Wrong values when changing zoom range

Posted: Wed Aug 10, 2022 11:28 am
by kamil.m
Hi there,

Thank you for contacting us.

Since you haven't provided any live demo with your code I can't reproduce the issue, so it will be guesswork.

When you exceed a certain threshold of points on a specific zoom level (or chosen timeframe) the default behavior of a Highcharts stock chart is to group those values into fewer points by averaging them, so they are more readable.

Please disable the dataGrouping property.

Code: Select all

    plotOptions: {
      series: {
        dataGrouping: {
          enabled: false
        }
      }
    }

API Reference: https://api.highcharts.com/highstock/pl ... ng.enabled

See demos below, resize them with navigator handles and observe how points on the chart behave.
With dataGrouping (default): https://jsfiddle.net/BlackLabel/4m20Lf5r/
Without: https://jsfiddle.net/BlackLabel/c0fLqrj5/

Let me know if that is what you were looking for,
Best regards!

Re: Wrong values when changing zoom range

Posted: Wed Aug 10, 2022 11:38 am
by Mapantz
Hi

Thanks for the reply.

I understand the data grouping, however, I am using the exact same code as my friend, he doesn't have the problem when viewing data on his chart and my chart - everything is correct. The problem lies outside of the chart, but the question is; why?

Re: Wrong values when changing zoom range

Posted: Wed Aug 10, 2022 12:13 pm
by kamil.m
Oh, now I see!

Could you please share your code in some online editor so that I can take a look at it, and test it in our environment?
Also, please tell me more about the browser that you and your friend are using, what operating systems do you run?
And the most important one, what Highcharts versions do you and your friend run?

Thank you!

Re: Wrong values when changing zoom range

Posted: Wed Aug 10, 2022 1:56 pm
by Mapantz
Hi

Apologies.. I don't really understand the editors. However: https://warehamwx.co.uk/js/graphs_test.js

And here's the chart in question: https://warehamwx.co.uk/graphs_recent.php#wdir

Re: Wrong values when changing zoom range

Posted: Thu Aug 11, 2022 9:14 am
by kamil.m
Hi there,

I have checked it in our environment but haven't gotten any errors. Everything is working fine, values do match on every timeframe.
On the screenshot, the time values for the hovered point are different by 3 milliseconds. Maybe there was some issue with the server request?
Please tell me if that issue still occurs, and is it only happening at the last point or the other points are also different?

Best regards!