How to show history in a LineChart
874211May 24 2012 — edited May 24 2012Hello,
I want to use a line chart to show the last 10 values of a variable. So I was able to create a chart with a series of data points, so now I have to update the chart every time the value changes.
My first approach was to let each Data item have the y-value of its follower, and store the new value in the last item. However, this causes the graph to oscillate, what I want is a left-shift.
Adding or removing Data items from the series causes an IllegalStateException, or, when I change the series in the fx application thread, causes a IllegalArgumentException: Children: duplicate children added: parent = Group@4ae3f686[styleClass=plot-content]
How can I create a line chart with data sliding to the left (or, as an alternative, turn off the animations entirely)?