You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run dynamic updates on a LineChartView, removing old data with removeEntry, and calling notifyDataSetChanged() on the view. However, when updating the chart, it appears as if the old graphics (points, grid lines, axes) are not removed and new graphics are drawn on top. The same happens when using BarCharView.
This is a real time app, with new data pushing out the oldest data. The X labels stay constant while the Y values propagate from the newest to the oldest (right to left) as new data arrives.
When rotating the device, the view clears up and renders correctly as soon as animation is completed, but then starts getting "corrupted" again as new data arrives. See image below for an idea:
I have also tried to modify each data point separately, and as a last resort, clearing the data completely and rebuilding the dataset at the arrival of each new datapoint, with the same result.
I must be doing something wrong, any pointers highly appreciated. Using IOS 9.2 with Charts 2.2.1
Thanks
rohiver
The text was updated successfully, but these errors were encountered:
That's because your view was marked as opaque but with a transparent backgroundColor.
If you want it to be transparent, it must be opaque = NO so that CG knows to clear the background.
Hi,
I am trying to run dynamic updates on a LineChartView, removing old data with removeEntry, and calling notifyDataSetChanged() on the view. However, when updating the chart, it appears as if the old graphics (points, grid lines, axes) are not removed and new graphics are drawn on top. The same happens when using BarCharView.
This is a real time app, with new data pushing out the oldest data. The X labels stay constant while the Y values propagate from the newest to the oldest (right to left) as new data arrives.
When rotating the device, the view clears up and renders correctly as soon as animation is completed, but then starts getting "corrupted" again as new data arrives. See image below for an idea:
I have also tried to modify each data point separately, and as a last resort, clearing the data completely and rebuilding the dataset at the arrival of each new datapoint, with the same result.
I must be doing something wrong, any pointers highly appreciated. Using IOS 9.2 with Charts 2.2.1
Thanks
rohiver
The text was updated successfully, but these errors were encountered: