Hi there
I'm using the Google Charts API. with a column chart. I'd like to add
an individual colur to each column in the chart.
This is my current code.
var data = new google.visualization.DataTable();
data.addColumn('string', 'x-axis label');
data.addColumn('number', 'Pence');
data.addRows([['a', 27.49], ['b', 27.81], ['c', 30.20]]);
var options = {
width: 1000,
height: 600,
hAxis : {textColor: '#ffffff'},
chxt: 'y',
chxs: '3,0000DD,13,0,t',
legend : 'none',
chco: 'FFC6A5|FFFF42|DEF3BD'
};
var chart = new
google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
I thought the 'chco' option might set the columns colours, but it
doesn't seem to be working. How can I do this?
Thanks for your help.
--
You received this message because you are subscribed to the Google Groups
"Google Chart 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-chart-api?hl=en.