Hi ,
I'm trying to have different colours for each bar in column chart. All
columns are coming out same colour. I'm thinking it may be an issue
with the foreach loop, any help much appreciated.
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Spread');
data.addColumn('number', 'spread count');
data.addRows([
<?php
foreach($bar as $key => $value) {
echo "['".$key."', ".$value."],";
}
?> ]);
var options = {width: 290, height: 320, title: 'Spread', colors:
['#c7cfc7', '#b2c8b2', '#d9e0de', '#cdded1'],'legend':'none',
titleTextStyle: {color: '#5c5c5c',fontName: 'Helvetica', fontSize:24},
titlePosition: 'out' };
--
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.