How to not draw line when value is VOID or 0
Thank you for a wonderful charting class.
I have a line chart that is "live" i.e., it's updated constantly. One of the problems currently is that during the day I want to stop drawing the line if I don't yet have a value. I have mainly modified the examples and my experiments from the sandbox, so it's possible I have overridden some default value that would do what I wanted. I can give the full source if needed.
So in the morning I don't have values for the afternoon so the line should stop to whatever the last value is.
The first image is an unfinished chart. So the line should end at 8.45 (and not start before 6 o'clock as there's no values).
Attachment:
day_should_cut.jpg [ 14.84 KiB | Viewed 12610 times ]
The 2nd chart shows how how the line continues even though the values are empty or zero.
Attachment:
day_notok.jpg [ 19.92 KiB | Viewed 12610 times ]
This graph shows how the chart should look like when all the values have been set, but the line is not drawn if the value is 0 or empty.
Attachment:
day_ok.jpg [ 41.96 KiB | Viewed 12610 times ]
I'm pretty sure there's a way to do it, but I just don't seem to find the correct setting.
Another problem currently is that I can't seem to format the time values (x-axis) without setting abscissa to it ("lundi 14 mars" in the second image)
I use (or have to use) the following in my code:
$myData->addPoints($time, $bottom_label);
$myData->setAbscissa($bottom_label);
If left off, the values for x-axis are just plain numbers instead of time values.
SO the question is how can I format the x-axis values so that I don't get the label below it but still get correct time values on the axis.