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

Fix line segments with alignToPixel #9042

Merged
merged 1 commit into from May 7, 2021
Merged

Conversation

kurkle
Copy link
Member

@kurkle kurkle commented May 6, 2021

Fix #9039

Simplified reproduce (equal to the added fixture test): https://codepen.io/kurkle/pen/yLMLEyy

Line segment calculation tripped on points at same coordinate on the boundary, it would break the segment at first point at the coordinate and then create one point segments for each point until the boundary condition is not valid anymore.

The fix is to skip the points with equal coordinate compared to previous point. So all the points with same coordinate end up in the same segment.

@etimberg etimberg added this to the Version 3.3 milestone May 6, 2021
@etimberg etimberg merged commit 137b51d into chartjs:master May 7, 2021
@kurkle kurkle deleted the fix-segments branch May 30, 2021 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background glitch on line chart with segments and gradient
2 participants