Pie chart colors

Share RGraph:   Share or Like RGraph on Facebook!

« 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 Jan on 25th October 2013
As one of my pie charts requires more than the default 13 colors I'm passing in my own. However, something is different. The new colors fill the pie pieces solid, whereas the default colors "whiten" towards the edge of the pie. Is there a setting to enable this effect if I pass in the colors? Thanks :)
Posted by RGraph Support on 25th October 2013
Hi there,


Yes - the default colors are gradients which you can specify using the RGraph shorthand like this:

obj.Set('colors', ['Gradient(blue:#ccf)','Gradient(red:#fcc)'])


Richard, RGraph Support
Posted by Jan on 25th October 2013
Thank you, I see. So there is no possible to just pass in normal colors and have them all being gradients towards the same color? I'm generating my JSON in PHP, so I can't use RGraph's own functions to influence the JSON.
Posted by RGraph Support on 25th October 2013
Hi there,

There's nothing in RGraph that generates a gradient from a color - but it would be easy to make your own function that takes an array of colors and returns an array of gradients.



Richard, RGraph Support

Add a reply




« Back to message list