View Full Version : Assign specific colour to each slice of a pie chart

25 Oct 2011, 2:51 AM

I have a requirement to display a pie chart where each key in the key, value pairs used in the pie chart data must be diaplayed on the pie as a specific colour.

for example

key1 - red
key2 - blue
key3 - green
key4 - grey

A data set of {key1: 500, key4: 200} will use red and grey
A data set of {key1: 500, key2: 200, key3: 300} will use red, blue and green

Initially I thought I would be able to do this using the colourSet config on the pie chart series. Unfortunalely as the colours in the colourSet are not expicitly assigned to a particular key I dont think this will give me what I need.

Is there a feature on a pie chart that does what I'm looking for?