How do I change the colors in a Pie chart?

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Leandro Medeiros on 22nd July 2015

How can I change the pie chart colors?
I have tried to change using the "properties.colors" as below without success.

var pie1 = new RGraph.Pie({
id: 'mapa_chuva',
data: [<?php echo $dados;?>],
properties: {
   colors: ['Gradient(#FFFF66:#CCFF66)','...',.... other colors as I need],
options: {

I'll be really greatifully with your help.

Thank's a lot.


Leandro Medeiros
SC - Brazil
Posted by Richard on 22nd July 2015

Close - but instead of "properties" it should be "options":

var pie1 = new RGraph.Pie({
id: 'cvs',
data: [4,8,6,5,3],
options: {
    colors: ['Gradient(#FFFF66:#CCFF66)'],


Add a reply

« Back to message list