How do I assign different colors to each serie of a Google bar chart I'm using Charts module to create some charts using the API. Depending on some variable i can create a pie chart or a column chart.

That variable is chart_type:

$chart_type = 'column';
$chart_type = 'pie';


This is the code I have:

$chart = array(
    '#type' =&gt; 'chart',
    '#title' =&gt; 'title',
    '#chart_type' =&gt; $chart_type,
    '#chart_library' =&gt; 'google',
    '#legend' =&gt; FALSE,
    '#tooltips' =&gt; TRUE,
    '#height' =&gt; 234,
    '#colors' =&gt; array('#006400', '#c11d0b'),
);

$chart['Status'] = array(
    '#type' =&gt; 'chart_data',
    '#title' =&gt; 'title',
    '#data' =&gt; array(500, 100),
    '#show_in_legend' =&gt; FALSE,
    '#show_labels' =&gt; FALSE,
);

$chart['xaxis'] = array(
    '#type' =&gt; 'chart_xaxis',
    '#labels' =&gt; array('Good', 'Bad'),
);

$my_chart['chart'] = $chart;

return drupal_render($my_chart);


When the chart is of type Pie, I can see the two colors (green and red) correctly assigned to the slices of the pie.
However, I can't assign the same principle to the column chart - in this case, both bars are green.

What I need is to have the colunn chart with the first bar green and the second one, red.

EDIT: Also, on the pie chart, I get two circles and I want to get rid of them. I thought it was a legend but it's not so... how can I remove them also?
It's hard to tell (without access to your site) what's causing your issue. But here is a working sample of a chart using the Charts API (disclosure: I'm a co-maintainer ...):

&lt;?php
  echo '&lt;p&gt;&amp;nbsp;&lt;/p&gt;';
  $chart = array(
    '#type' =&gt; 'chart',
    '#chart_type' =&gt; 'column', // pie, bar, line, column, area, scatter
    '#chart_library' =&gt; 'google', // Allowed values: 'google' or 'highcharts'
    '#title' =&gt; t('Meals by store'),
   '#colors' =&gt; array('#006400', '#000064', '#640000', '#c11d0b'),
  );
  $chart['store1'] = array(
    '#type' =&gt; 'chart_data',
    '#title' =&gt; t('Store 1'),
    '#data' =&gt; array(16, 11, 13),
    '#suffix' =&gt; ' Meals',
  );
  $chart['store2'] = array(
    '#type' =&gt; 'chart_data',
    '#title' =&gt; t('Store 2'),
    '#data' =&gt; array(12, 14, 17),
    '#suffix' =&gt; ' Meals',
  );
  $chart['store3'] = array(
    '#type' =&gt; 'chart_data',
    '#title' =&gt; t('Store 3'),
    '#data' =&gt; array(9, NULL, NULL),
    '#suffix' =&gt; ' Meals',
  );
  $chart['store4'] = array(
    '#type' =&gt; 'chart_data',
    '#title' =&gt; t('Store 4'),
    '#data' =&gt; array(5, 10, 20),
    '#suffix' =&gt; ' Meals',
  );
  $chart['xaxis'] = array(
    '#type' =&gt; 'chart_xaxis',
    '#labels' =&gt; array('Breakfasts', 'Light Meals', 'Sandwiches'),
  );

  // dpm ($chart);

  $example['chart'] = $chart;

 return drupal_render($example);
?&gt;


If you have the (dangerous) PHP filter enabled, just paste it all in the body of node, and see what happens (make sure you have a working internet connection if you use the Google library).

It should show 3 column charts (1 for each type of "meal"), with each chart having up to 4 columns (1 for each "store").

BTW, make sure you're using the most DEV version (I'm using Version: 7.x-2.0-rc1+5-dev).