title: Setting colors in a bar chart using Google Chart
body: <p>I'm looking for a way to have different colors on a bar chart, based on the values.</p>
  
  <p>I have something like this :</p>
  
  <pre><code>    for(var i=0; i&lt;table.length;i++){
          colors[i]=new Object();
          if (table[i][1]&lt;=300){
              colors[i].color='blue';
          }
          else if (table[i][1]&lt;=800){
              colors[i].color='yellow';
          }
          else{
              colors[i].color='red';
          }
      }
  </code></pre>
  
  <p>So "colors" is an array of objects, and every object has a color field. Then I do this :</p>
  
  <pre><code>    var options = { series: colors};
  </code></pre>
  
  <p>But this doesn't work. So I made easier tests like these:</p>
  
  <pre><code>   colors: ['black','blue','white','blue','blue','blue','blue']
  </code></pre>
  
  <p>Doesnt work: just the FIRST color is taken for the whole chart.</p>
  
  <pre><code>   series: [{color:'black'},{color:'blue'}]
  </code></pre>
  
  <p>Same effect.</p>
  
  <p>Can anyone please help me do it?</p>
  
  <p>Thanks.</p>