Hi,my problem is that
I use XYSeries, and when I call update method it doesn't update my chart?
How can I update my chart with XYSeries on dataset?
XYSeries update not work
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Most likely the XYSeries you are updating doesn't actually belong to the XYSeriesCollection being displayed in the chart. But I can't tell for sure because you posted hardly any information.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


I use:
XYSeriesCollection DATASET
XYSeries SERIES
The chart displays dataset correctly.
I check values of series as follows:
for i
DATASET .getSeries(0).getDataItem(i).getY()
and it shows the same values of SERIES that was set.
Next step is updating my series, I tried two ways:
DATASET.getSeries(0).update(new Double(0), new Double(5));
DATASET.getSeries(0).updateByIndex(0, new Double(5));
Then, I check new value (in both ways):
DATASET.getSeries(0).getDataItem(0).getY()
and it correctly shows me new updated value (5), but chart is constantly showing not-updated series (even if I call chartPanel.repaint())
How can I refresh my chart with updated series?
XYSeriesCollection DATASET
XYSeries SERIES
The chart displays dataset correctly.
I check values of series as follows:
for i
DATASET .getSeries(0).getDataItem(i).getY()
and it shows the same values of SERIES that was set.
Next step is updating my series, I tried two ways:
DATASET.getSeries(0).update(new Double(0), new Double(5));
DATASET.getSeries(0).updateByIndex(0, new Double(5));
Then, I check new value (in both ways):
DATASET.getSeries(0).getDataItem(0).getY()
and it correctly shows me new updated value (5), but chart is constantly showing not-updated series (even if I call chartPanel.repaint())
How can I refresh my chart with updated series?