Stop and restart a chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ajgwin
Posts: 18
Joined: Mon Mar 17, 2003 4:53 pm

Stop and restart a chart

Post by ajgwin » Tue Jun 17, 2003 10:56 pm

I want to stop my chart and then restart it without a line between the points that are stopped and restarted. I have another series that will print in between the stops and starts. Is there a way to do this? Thanks.

Allyson

n3cm
Posts: 8
Joined: Tue May 13, 2003 12:40 pm

Post by n3cm » Wed Jun 18, 2003 5:57 pm

If you add a null data item to a series this will give you a discontinuous plot.

Code: Select all

XYSeries series1 = new XYSeries("First");
series1.add(1.0, 1.0);
series1.add(2.0, 4.0);
series1.add(3.0, 3.0);
series1.add(4.0, null);
series1.add(5.0, 5.0);
series1.add(6.0, 7.0);

ajgwin
Posts: 18
Joined: Mon Mar 17, 2003 4:53 pm

Post by ajgwin » Wed Jun 18, 2003 9:22 pm

That worked. Thank you.

Allyson

Locked