views:

376

answers:

1

I've a dynamic timeseries chart to which some value is added every 20 seconds. I want to set the width of the plot to something like say 30 minutes so that my chart starts showing a "30-min canvas/plot" starting from the left hand side until it fills up the whole plot. After every 30 minutes, I want to clear up the old data and only show the latest 30 minutes data which means at any given point of time, my chart will only show data of latest 30 minutes. I've already created chart and its working great except that the starting domain range gets fixed to the point from where it started even after couple of hours.

A: 

Get upperbound after 30 minutes, then set lowerbound to the upperbound and the new upperbound to the old upperbound+30minutes?

http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/ValueAxis.html#getUpperBound%28%29

dada
that's what exactly I ended up doing. BTW, how to get upperbound after every 30 minutes? I'm using Timer, is there any other clean ways?
chown