Hello,
How can I set the behaviour of null values in a Timeseries?
In the examples I found (e.g. here http://www.java2s.com/Code/Java/Chart/J ... lvalue.htm)
the method org.jfree.chart.ChartFactory.createTimeSeriesChart(String, String, String, XYDataset, boolean, boolean, boolean) is used to create the chart.
Here, null values are not shown and the line is disconnected. This is how it should be.
In my case (which are compicated charts not using this Factory method but with many settings for renderes, axes etc.) lines are NOT disconnected at null values. I tried to go through the code, but I could not find the "switch" for this behaviour.
Maybe you can tell me where to look at!
I'm using jfreechart-1.0.19.jar.
Thanks,
Julia
Null values in TimeSeries
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Null values in TimeSeries
It is the standard behaviour for the renderers in JFreeChart to discontinue lines when there is a null value. There isn't a switch for it. You should double check that you are using a standard renderer and not a custom one. And also that the dataset really does contain the null values...maybe somewhere in your code you exclude them.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Null values in TimeSeries
You were right, null values were not added to the timeseries (sorry for not checking this before). This code is about 10 years old and I read about some bugs with null values those days. Maybe that's why.
Anyway, now it works fine, Thanks!
Anyway, now it works fine, Thanks!