Lets consider that we have data like this about the current date. Timestamps are full, I just prefer not to write them here fully.
time = value
14:05 = 1
14:10 = 3
14:15 = 2
14:20 = null
14:25 = 1
14:30 = 2
14:35 = 3
When my series data contains datevalue that have null value on it, like 14:20 here, JFreeChart stops drawing the line at 14:15 and starts at 14:25 again.
This is logical and currect usually. But what if I'd want to draw a straight line from 14:15 at 2 to 14:25 at 1 totally skipping 14:20. How could I do this?
Is there some parameter to tweak, or should I run a for-loop to check if there's null value in this serie and pop that date out of my dataset?
Thanks in advance..
XYLinePresentation gaps
-
- Posts: 25
- Joined: Wed Jun 09, 2004 6:15 am
- Location: Helsinki, Finland
- Contact:
XYLinePresentation gaps
~ Arkkimaagi ~
Experto Credite
Experto Credite
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
If you want the line connected, then just check for a null value and don't add that item to the dataset.
Alternatively, you could modify the renderer to ignore null data values.
Alternatively, you could modify the renderer to ignore null data values.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

