What do you mean by "it keeps changing randomly"?  Does it change when you 
change the data?  The way the colors work in PieCharts is that they are 
assigned in the row order of the data (so in your case, whatever data is in 
the first row will always have the color '#C1D558').  If you want to assign 
specific colors to specific data elements, you have to change the colors 
array to fit your data set.

On Tuesday, December 11, 2012 9:29:27 AM UTC-5, Manish Kumar wrote:
>
> Hello Every body,
> I am using Google pie chart where i have maximum 4 sectors and the data 
> for them are coming from my database.
> The code i used for colors is
>
> var options = {
>     chartArea: {width:300, height:135},
>     height:165,
>     margin:10,
>     colors: ['#C1D558', '#22297A', '#C21536', '#996ab2'],
>     is3D: false
>     
>             
>     };
>
> I want fix color for each element of the pie chart. It keep on changing 
> randomly. Please suggest me how to get that.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/0YD935TK4SgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to