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