How can I set gradient effects on pie charts?
[{
label: i,
data: 1000,
color: [ "rgb(190,110,110)", "rgb(140, 70, 70)", "rgb(110, 50, 50)", "rgb(60, 10, 10)" ]
},
//nextserie
]
doesn’t work.
Also how can I set gradient effects as default colors for my charts? In the way you can index it by number like:
[{
label: i,
data: 1000,
color: 1,
},
//nextserie
]
I have now added support for rendering pie chart with gradients, either radial or linear. My commit is referenced in pull request #853.
An example “default” pie chart with a radial gradient:
An example donut chart with a radial gradient:
An example of a tilted pie chart with a radial gradient:
The changes were based on a combination of the above suggestions proposed by @Hoffman and a patch suggested in Flot issue #355 by Luc Boudreau.