Page 1 of 1

Need create an extension for data grouping algorithm.

Posted: Fri Oct 15, 2021 5:52 pm
by dimabinskyi
I have series more than 100,000+ on chart, and I need to use dataGrouping to prevent charts lagging because I have more than 1 chart on the page.

For me really important to set max difference between grouping data. I mean If I have an array [..., 1, 1.1, 0.9, 1.1, 0.9, 0.1, -2, -1.9, -2.1, ... ], in chart I want to see [1, -2].
PS: Working with line chart.

Any suggestions will be appreciated. Thanks!

Re: Need create an extension for data grouping algorithm.

Posted: Fri Oct 15, 2021 6:55 pm
by mateusz.b
Hello dimabinskyi,

Welcome to our forum and thanks for contacting us with your question!

You can use dataGrouping.approximation to achieve such effect. You've mentioned line chart as an example which use average approximation but since you want to show min and max value then I think that range approximation would be better in this case.
API reference: https://api.highcharts.com/highstock/se ... roximation

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

Re: Need create an extension for data grouping algorithm.

Posted: Mon Oct 18, 2021 8:40 am
by dimabinskyi
mateusz.b wrote: Fri Oct 15, 2021 6:55 pm Hello dimabinskyi,

Welcome to our forum and thanks for contacting us with your question!

You can use dataGrouping.approximation to achieve such effect. You've mentioned line chart as an example which use average approximation but since you want to show min and max value then I think that range approximation would be better in this case.
API reference: https://api.highcharts.com/highstock/se ... roximation

Let me know if that was what you were looking for!
Best regards!
Thx for your reply!

But in my case it's important to show values difference. For example If I have 2 & 4, on chart I need to display 2 & 4 points, not 3, 2 or 4. But If I have [..., 1.9, 2, 2.1, 2.1, 4, 4.1, ...] I need to show 2 & 4 points.

Hope, you will help me with this info.

Re: Need create an extension for data grouping algorithm.

Posted: Wed Oct 20, 2021 7:53 am
by mateusz.b
Hi dimabinskyi,

That information is helpful but I still don't understand your calculations. Let's take a look at your example with [..., 1.9, 2, 2.1, 2.1, 4, 4.1, ...]. You say that 2 & 4 points should be shown but the min and max values are 1.9 and 4.1. It makes me wonder if you want to get rid of decimal places for some values and show integers only? Also what do you mean by value difference? Highest and lowest value?

Thanks for any additional details.
Best regards!