Custom colors for pie chart

Re: Custom colors for pie chart

by Richard Flurey -
Number of replies: 0

Hi Gisele,

I am surprised nobody got back to you. This is something we've done on many installations of Moodle. It is just a PHP coding customisation rather than a Moodle thing.


You can simply change the following line in graph.php:

$Test->createColorGradientPalette(195,204,56,223,110,41,5);


Change it To:

$Test->createColorGradientPalette(249,186,17,166,6,195,0);


That will give a little more variety to the colours, rather than the many shades of yellow and orange. It should be as simple as that.


I hope that helps.


Cheers,

Richard

Average of ratings: Useful (2)