0

I'm using JFreeGraph API to plot real time graphs for read/write operations. To give real time feel i update the graph for every 1000 updates; with one XYSeries already added to dataset. So as new update comes, series updates itself as xySeries.addOrUpdate(int, int);

Currently I'm using only one series which doesn't let me add or update in nonUI thread and in case of UI thread, rest of the access gets blocked. So I was wondering if i could work on temp series in nonUI thread and only in case of update use UI thread. Is there any way I can update temp series and then add it into xySeries in UI thread? Something like, concatenating of 2 xySeries?

Please share if there are any other work around, solutions, etc.

Thanks, Vrushali

Vrushali Babar
  • 51
  • 1
  • 1
  • 3
  • You might be able to use one of the approaches shown in [Using `JFreeChart` to display recent changes in a time series](http://stackoverflow.com/questions/5048852/using-jfreechart-to-display-recent-changes-in-a-time-series). – trashgod Oct 13 '11 at 14:27
  • THanks for your reply. Is there any way i can modify series offline and then update? my series is already linked with dataset. I need a way to update series offline without making actual change in graph and then fire update after certain interval. – Vrushali Babar Oct 14 '11 at 05:39

1 Answers1

1

From XYSeries, chose an add() method that allows you to specify a value for notify, setting it to true only after you want to the notification to occur. The actual implementation will depend on your sorting and duplicate value requirements. Providing an sscce may be helpful.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045