-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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 lines not displaying when x-coordinates are unordered #3201
Conversation
This commit fixes an issue brought up in ChartsOrg#2567 (ChartsOrg#2567), where lines (and points) in LineCharts would not render correctly if the x-values were not in order.
@liuxuan30 I don't understand why we use the old logic that was there, are you able to shed any light on it? |
The old code seems starting from v2.x. And This reminds me of the sorting, when zooming in, it needs to get the correct range of the current visible x values. In v2.x, x values are index based, so it's naturally sorted. If we could come up with another solution, maybe it won't need sort |
I hadn't tested it with zooming in, sorry about that. I can investigate a better fix, but please feel free to close the PR if you'd rather take a different approach to solving this @liuxuan30 |
@barriserloth Please investigate further if you have time, and reopen this PR if you come up with a better solution. |
yeah, you are welcome on this, but sorting is not that simple to remove for the moment. If it's just about axis values, we could replace them with axis.entries index. maybe? |
Codecov Report
@@ Coverage Diff @@
## master #3201 +/- ##
=========================================
Coverage ? 22.25%
=========================================
Files ? 116
Lines ? 15593
Branches ? 265
=========================================
Hits ? 3471
Misses ? 12089
Partials ? 33
Continue to review full report at Codecov.
|
The line chart display correct now for unordered x-coordinates but can not highlight. Please support me on this |
This commit fixes an issue brought up in #2567
(#2567), where
lines (and points) in LineCharts would not render correctly if the
x-values were not in order.
Let me know if this duplicates something that is already open, or if this is not a fix that users are interested in.