Hello,
Actually what i am facing i am elaborating it bit more. If i have 4 data 
elements and for each these four colors are assigned. All these four 
elements are elaborating counts for 4 features. 
When the data regarding any of the elements changes then after some changes 
if A element was green and B was red like that, then color sequence changes 
now A is showing red B as green. I need to make colors for each elements to 
be constant. Like A should always be red what ever may be data for it. Even 
if it is 0 when it comes it should be always red.
If A is not there no other element should be red. Like that all colors for 
other elements should be specific.

Thanks.





On Tuesday, December 11, 2012 10:38:32 PM UTC+5:30, asgallant wrote:
>
> 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/-/01YhCSPucAcJ.
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