-
-
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
Line chart doesn't redraw correctly after removeEntry() #2411
Comments
You call removeEntry at data set level, which seems not correct, try call |
Hi Xuan, I get the exact same behavior when using Here's the exact code:
Can you please reopen until we both agree this is addressed? As an aside, isn't
wrongly declared? If xValue is intended to be an index then a) it should be named xIndex and b) it should be an Int. Thanks! |
Since chart 3.0, x axis is same as y axis almost. So taking double is correct. The question is, has it remove the entry you want? |
The issue is exactly as I originally described it— the point is removed but the graph is not redrawn. The old grid line is still there and the x axis doesn't "squeeze in". I attached a sample project to the original description so you can reproduce it easily. |
If you are talking about your screenshots, I'd say it's expected from my side. The '83' point is not connected, and 96 directly connected to whatever '8' is on the right edge. About the x axis 'squeeze in', I don't see any reason for it, as the x axis range is not changed, right? You removed one entry, whose x value is neither min nor max, so the x axis should not change. You seem take x axis as indexed based axis just like chart 2.x, but in chart 3.0, the x axis behaves like y axis. You can -1 for the rest of your entries' x value, so it will squeeze in I suppose. |
Yeah, the x values are indexed in this case so I'd need to go through all the subsequent x values and decrement them by 1 to get that effect. That makes sense. Sorry for misunderstanding! |
If you add a few entries to a line chart and have for e.g. this:
Then remove the entry at index 2 ("83") and you get something like this:
Clearly the chart isn't redrawing correctly. The old grid line is still there and the space where the old value was didn't condense. Here's a sample project to demonstrate:
ChartsRemoveBug.zip
(You'll need to add the Charts directory to the top level…)
This sounds very similar to #745 which was closed after the bug mysteriously stopped happening to the originator.
The text was updated successfully, but these errors were encountered: