I am using jfreechart to draw a line chart for some monthly data. It is working fine but I do not want to connect those data points which there are some gaps between them. for example I don't want to connect the point for 1/31/2015 to the point for 3/30/2015 because there is no data for 2/28/2015. Is there any configuration for jfreechart to handle this issue?
Asked
Active
Viewed 485 times
1
-
Can you use multiple series? – trashgod Dec 02 '15 at 03:39
-
@trashgod I cannot use that. I think I need to set the value for those dates which there is no data to null. I mean I have to add all dates in my dataset even for nulls. But my dataset just contains the dates which have values. Is there any way to set those dates values to null? – Nisman Dec 02 '15 at 04:59
-
I never tried; maybe use `setBaseShapesVisible()`, for [example](http://stackoverflow.com/a/5522583/230513), to signify actual data. – trashgod Dec 02 '15 at 11:59
1 Answers
2
All you need to do is put a data point for 2/28/2015 with a value of Double.NaN - JFreeChart will then automatically display a gap...

xpa1492
- 1,953
- 1
- 10
- 19