RE: Recolor Pie Chart
02-05-2021, 03:17 AM
(This post was last modified: 02-05-2021, 03:20 AM by stelabentley.)
To apply a color scheme to your chart, you can use the loadPalette function. This function must be called before any charting function.
1.
/* Create the pData object */
2.
$MyData = new pData();
3.
4.
/* Populate some data */
5.
$MyData->addPoints(array(1,2,3,4),"My Serie 1");
6.
7.
/* Will replace the whole color scheme by the "light" palette */
8.
$MyData->loadPalette("palettes/light.color", TRUE);
..then draw your charts.
____________________________________
Optics 4 birding
1.
/* Create the pData object */
2.
$MyData = new pData();
3.
4.
/* Populate some data */
5.
$MyData->addPoints(array(1,2,3,4),"My Serie 1");
6.
7.
/* Will replace the whole color scheme by the "light" palette */
8.
$MyData->loadPalette("palettes/light.color", TRUE);
..then draw your charts.
____________________________________
Optics 4 birding