Hide connection line in TimeSeries plot

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Pracs
Posts: 1
Joined: Fri Jan 08, 2016 6:32 am
antibot: No, of course not.

Hide connection line in TimeSeries plot

Post by Pracs » Fri Jan 08, 2016 6:44 am

Hi all,

In time series, there a time gap of certain duration. When chart is plotted the gap is replaced by a straight line.

Using XYLineAndShapeRenderer can control whether the item or line is visible using the following calls:

renderer.setSeriesLinesVisible(series, false);
renderer.setSeriesShapesVisible(series, false);

but it affects the whole series.

How can i avoid this straight line for the time gap in time series plot?

Thank you,
Pracs

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Hide connection line in TimeSeries plot

Post by paradoxoff » Fri Jan 08, 2016 12:40 pm

Add a data item with a null or Double.NaN y value to your series. This should interrupt the line.

John Matthews
Posts: 513
Joined: Wed Sep 12, 2007 3:18 pm

Re: Hide connection line in TimeSeries plot

Post by John Matthews » Fri Jan 08, 2016 5:23 pm

Cross-posted here.

Locked