Dynamic Real-Time chart with JAVA
Posted on 2006-11-24
I need to create a line chart that needs to show real-time data. So, the data is supposed to be updated in real-time basis and I need to movement of the chart to be visible everytime a new data is added. I tried JFreeChart, though it is quite easy to use and I managed to draw the chart. But, it is not real-time.
Let say I have process that loops 100 times. Each loop will take about 30 seconds to return a value. Then I plot this value to the dataset of the chart. But I couldn't see the chart moving as more values were added. It just showed blank screen until the 100th loop, then it showed all the values at one go. For JFreeChart, everytime we added new value, the entire chart is redrawn again from scratch, it is not really suitable for real-time charting.
Does anybody have a better recommendation or solution on this?