language-circuitpython icon indicating copy to clipboard operation
language-circuitpython copied to clipboard

Recreate chart when a new datapoint is added or removed

Open jb3 opened this issue 5 years ago • 0 comments

When a datapoint is added after the plotter has initialised then a new line will not be created, since the line count is determined from the initial data.

This should be refactored to dynamically recreate the chart once the item count has changed.

This will probably be as simple as a new property defining how many lines we are drawing, on every new item coming in confirm it's the same length, if not then go through the chart initialisation flow again. A more advanced method of doing this would be to just remove the series from the existing chart by updating the chart instance.

jb3 avatar Oct 20 '20 01:10 jb3