Hi guys,
I'm looking for a way to have different colors on a bar chart, based on the 
values.

I have something like this : 

        for(var i=0; i<table.length;i++){
            colors[i]=new Object();
            if (table[i][1]<=300){
                colors[i].color='blue';
            }
            else if (table[i][1]<=800){
                colors[i].color='yellow';
            }
            else{
                colors[i].color='red';
            }
        alert(colors[i].color);
        }

So "colors" is an array of objects, and every object has a color field. Then I 
do this :

        var options = { series: colors};

But this doesn't work. Can anyone please help me do it?

Thanks.

-- 
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/-/vTwGoN2u5tIJ.
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