Skip to content
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

Highstock cumulative line series y axis labels are wrong #18974

Closed
mirkori opened this issue May 10, 2023 · 3 comments · Fixed by #19023
Closed

Highstock cumulative line series y axis labels are wrong #18974

mirkori opened this issue May 10, 2023 · 3 comments · Fixed by #19023

Comments

@mirkori
Copy link

mirkori commented May 10, 2023

Expected behaviour

If i have lots of line data (1000+ data points) and want to view the cumulative line plot, the y axis labels should be correct independent of the chart width.

Actual behaviour

The y axis value is displayed incorrectly if the chart is not wide enough.

Live demo with steps to reproduce

This example demonstrates the y axis labels incorrectly displayed for cumulative line data with values 1 to 1000.

It shows three charts rendering the same data but with different widths.
The top y axis labels should all be about 500k (sum of 1 to 1000) but only the first chart (2000px wide) actually displays the correct label.
The second and third chart (1000px and 200px wide) display incorrect y axis labels.

https://jsfiddle.net/tgaepxqy/1/

Product version

Highstock JS v11.0.1 (2023-05-08)

Affected browser(s)

Chrome (112.0.5615.137), Firefox (112.0.2), Safari (16.4)

@highsoft-bot highsoft-bot added this to To do in Development-Flow via automation May 10, 2023
@faebuk
Copy link

faebuk commented May 11, 2023

I think the problem is with data grouping of Highcharts.

You can fix the issue using the following configuration.

dataGrouping: {
    enabled: false
}

@karolkolodziej
Copy link
Contributor

Hi @mirkori, @faebuk is right this behaves differently because of the dataGrouping -demo.

Internal note:
IMO the cumulative API documentation and Cumulative docs need improvement- It should inform how this behaves when the dataGrouping enabled.

@pawelfus
Copy link
Contributor

sum approximation should be the default one for cumulativeSum series - we need to change it in the core

Demo: https://jsfiddle.net/BlackLabel/Lwrxagfe/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

6 participants