I have made two web start demos:
1. real time plot at: http://tjiang2000.googlepages.com/rt_demo.jnlp
2. real time scroll plot at: http://tjiang2000.googlepages.com/rt_scroll_demo.jnlp
Yes, I did purposely fix the range of xaxis and borrow the setLowerMargin and UpperMargin parameter to set how up how much I need to scroll. For example, if the value is set to 0.25, it means when plot reaches the right end boundary, it will scroll 1/4 of the plot to left and leave 1/4 of whole plot area to plot the new stuff.
I think for very hight speed real time plot, the zooming options should be disabled for two reasons:
1. simplicity: the performance gain of my approach is achieved by only draw two points at a time. Once zoomed, I need to notify the dataset to draw the full set. However, zooming is implemented inside ChartPanel and it is very hard from ChartPanel to get information on dataset unless adding lots of code.
2. realistic: for very high speed plot, it will be very difficult for user to watch the zoomed area because the plot will move much faster than the regular plot. unless they want stop the plot and then zoom. The other alternative option is to take a snapshot and store it in SVG format and let browser to do zooming.
Yes, I did see overlapping when more then one series in a chart. This is because I plot them in random values. One way to fix it is to create a CombinedDomainXYPlot to hold multiple XYPlots and let each XYPlot hold one series but let them share the same xaxis. Or another simple way is to add some offset value for each of series and let them separated.