Vertical discontinuities in TimeSeries

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Andrew

Vertical discontinuities in TimeSeries

Post by Andrew » Thu Jun 07, 2001 12:33 am

DefaultXYDataSource has the function:
public Number getYValue(int seriesIndex, int itemIndex)

which assumes 1 y value per x value.

I need to plot a vertical discontinuity (ie 2 y values for the same
x value).

Is there an easy way to do this ?

Alternately, is it possible to add a vertical line to the graph
after it has been plotted as an annotation, which would
also suffice ?

Another way might be to have 2 series, and start one
immediately after the 1st has finished, making the starting
x value of the 2nd series the same as the last x value
of the 1st series, but the y value of the last point in the 1st
series would be different to the 1st y value of the 2nd series.

Thanks

David Gilbert

RE: Vertical discontinuities in TimeSeries

Post by David Gilbert » Thu Jun 07, 2001 11:11 pm

Hi Andrew,

I think your final suggestion makes the most sense - the XYPlot can have many series, and the range of x-values in each series is independent of the other series. Then again, it depends on what the discontinuity represents...

Regards,

DG.

Locked