jquery flot pie slice color

Caveatrob picture Caveatrob · Oct 19, 2010 · Viewed 14.6k times · Source

I can't figure out how to get flot.pie to change the pie slice color, just the series color. Is this possible?

Answer

Tamlyn picture Tamlyn · Apr 5, 2011

You need to specify the color as part of the data array.

So instead of

[1, 2, 3]

you do

[
    {data: 1, color: '#f00'},
    {data: 2, color: '#0f0'},
    {data: 3, color: '#00f'}
]