dimabinskyi
Posts: 2
Joined: Fri Oct 15, 2021 5:42 pm

Need create an extension for data grouping algorithm.

Fri Oct 15, 2021 5:52 pm

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!

mateusz.b
Posts: 798
Joined: Tue Jul 13, 2021 11:34 am

Re: Need create an extension for data grouping algorithm.

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!

dimabinskyi
Posts: 2
Joined: Fri Oct 15, 2021 5:42 pm

Re: Need create an extension for data grouping algorithm.

Mon Oct 18, 2021 8:40 am

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.

mateusz.b
Posts: 798
Joined: Tue Jul 13, 2021 11:34 am

Re: Need create an extension for data grouping algorithm.

Wed Oct 20, 2021 7:53 am

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!

Return to “Highcharts Stock”