Series are drawn black?
No, this is not a bug! Series can be drawn as black in at least two circumstances.
You do not have enough colors in your palette
Everything is in the title! Remember, basically pChart embed only colors for 8 series. If you have more
than 8 series, you'll need to add colors to you palette. The
setColorPalette() is here to help
you!
setColorPalette(8,255,0,0);
setColorPalette(9,0,255,0);
setColorPalette(10,0,0,255);
you can also load a color scheme (assuming it contains enough colors!) :
$Test->loadColorPalette('palette.txt');
logical no?
Series descriptions are not set
This bug has been fixed since version 1.27
In order to keep the association between color ID and series in case you are dynamically removing
series (when using
drawArea() for example) some drawing function needs that all serie have
a description. To add a description to one serie, use the
SetSerieName() method from the
pData class :
$DataSet->SetSerieName("January","Serie1");
$DataSet->SetSerieName("February","Serie2");
$DataSet->SetSerieName("March","Serie3");
not logical, I know.
|
|
Last updated on 07/18/2008 |