3 messages in com.googlegroups.google-visualization-api[visualization-api] Re: how to set a ...
FromSent OnAttachments
redrose27 Jul 2008 22:20 
VizGuy (Google)27 Jul 2008 23:32 
redrose27 Jul 2008 23:53 
Subject:[visualization-api] Re: how to set a color to each part of the pie chart
From:VizGuy (Google) (viz@google.com)
Date:07/27/2008 11:32:19 PM
List:com.googlegroups.google-visualization-api

Array in JavaScript is enclosed in [] : colors: ['red', 'green', 'blue', '#ffcc00']

On Jul 28, 8:20 am, redrose <redr@gmail.com> wrote:

how to set a color to each part of the pie chart.

Could u give me an example considerign the fact i have 3 values names sales james 3000 john    5000 mary  1000

saly i plot a pie chart to reresetn each ones sales.I want each of the parts to ahve a color of my choice.I know there is a colors attribute but don't  understand how to define the colros for each part. var chart = new google.visualization.PieChart(document.getElementById('chart_div2'));  chart.draw(data, {width: 450, height:225, is3D: true, title: t,legend:'label',backgroundColor:{stroke:'black', fill:'#eee', strokeSize: 2},colors:{'red','blue','black','yellow','green'}});

Can you tell me the syntax when defining an array of colors