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

Line Plot Y-range incorrect when series has multiple points with same x-value #4560

Closed
alankalb opened this issue Jul 8, 2024 · 3 comments · Fixed by #4576
Closed

Line Plot Y-range incorrect when series has multiple points with same x-value #4560

alankalb opened this issue Jul 8, 2024 · 3 comments · Fixed by #4576
Labels
bug Something isn't working verified

Comments

@alankalb
Copy link

alankalb commented Jul 8, 2024

Description

When plotting a line chart, the y-axis range is not correct if the series has multiple points with the same x value and one of those points is outside of the range of all other points in the series.

From my testing, it appears that this occurs when there are more than two points that share the same x value. Only the first two points are used to calculate the range. All others seem to be discarded.

Steps to Reproduce

  1. Create a line plot with at-least three points that have the same x value. Ensure the last point has a y value that is greater than any other y value in the series.

Expected Behavior

Y-axis range for axis is calculated from absolute range of series

Actual Behavior

Y-axis range axis range is not calculated correctly when multiple points in a series have the same x value.

Screenshots

image

Reproduction Link

https://codepen.io/Alan-Kalbfleisch/pen/KKLorJe

@alankalb alankalb added the bug Something isn't working label Jul 8, 2024
@alankalb
Copy link
Author

alankalb commented Jul 8, 2024

The same issue occurs with scatter plots. This is actually more concerning for scatter plots as a scatter plot should definitely be able to plot multiple points with the same x-values without breaking. I can somewhat understand why this may break for line charts as there could be an assumption that line charts should be for results from well-defined functions.

@junedchhipa
Copy link
Contributor

@rosco54 can you take a look at this one? This seems to be broken after v3.46.0

@rosco54
Copy link
Contributor

rosco54 commented Jul 10, 2024

@junedchhipa Working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants