Menu

#21 Curve draw to 0 value when there is no value

open
nobody
None
5
2008-11-14
2008-11-14
Anonymous
No

Example #18 - 'Missing values' shows a great example of drawing graphs with missing values. But when you draw a graph with drawCurve the last line always points to the 0 value.

To see it use the next points as example:
$DataSet->AddPoint(array( "", "", "", "", "",255,256),"Serie1");
$DataSet->AddPoint(array(250,250,250,250,250,255,""),"Serie2");

Then give the graph a fixed scale to zoom in:
$Test->setFixedScale(240, 260);

The last line in 'Serie2' is pointing to the 0 value. You can test it when you change the last value in this serie to 0. The same graph is made, but now also with the line to the 0 value.

When the last value is removed the last line is flat, because it uses the value before that and the graph has a nice curve. I expect to have the same curve when I use "" as the last value, but ofcourse without the flat line on the end.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB