You can create a DataTable with 3 columns (location, number of projects, and severity), and use the severity information to populate an array of color values that you can pass to the chart's "colors" option. Use a DataView to filter out the severity column when drawing the chart. See an example here:
http://jsfiddle.net/asgallant/gwm4u/On Friday, December 28, 2012 4:27:27 AM UTC-5, JPrasanna Venkatesan wrote:
Hi,
I have a pie chart which connect Account Name and Number of projects in that account
Say Account Names can be Asia, Africa, America, Europe and Number of Projects can be 11,12,13,14
Asia 11
Africa 12
America 13
Europe 14
I want the pie slice size to be based on the number of projects BUT the color should be based on the severity which can be 1 (red) or 2 (yellow) or 3 (green)
i.e. if
Asia's severity is 3
Africa's severity is 2
America's Severity is 3
Europe's is 1
then
the color of Asia slice and America slice should be green
color of Africa slice should be yellow
color of Europe slice should ne red
Regards,
J Prasanna Venkatesan