The code sample at
http://code.google.com/apis/ajax/playground/?type=visualization#image_multicolor_bar_chart
uses
ImageChart, not ColumnChart. It can be confusing, but image charts are
wrappers around the Image Chart API (
http://code.google.com/apis/chart/image/) which are a completely different
beast than the Javascript Visualization API. For the JS API, as Drew wrote,
colors are assigned by series. You can use a stacked ColumnChart where the
number of columns (series) is the same as the number of bars, and in each
series put the value in a different location. Something like:
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', '');
data.addColumn('number', '');
data.addColumn('number', '');
data.addRow(['Danny', 3.7, 0, 0]);
data.addRow(['Betty', 0, 4.1, 0]);
data.addRow(['Miles', 0, 0, 4.8]);
On Thu, Oct 6, 2011 at 5:36 PM, asgallant <[email protected]> wrote:
> Be aware that colors in the interactive charts are assigned by series
> (column in the DataTable). You cannot have a single series with more than
> one color for the bars, but there are tricks to work around the problem if
> you need to.
>
> --
> 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/-/PNcgk6v8P-MJ.
>
> 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.
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
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.