Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to show history in a LineChart

874211May 24 2012 — edited May 24 2012
Hello,

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)?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2012
Added on May 24 2012
3 comments
224 views