lcm133
unread,Nov 2, 2011, 12:16:53 PM11/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Visualization API
Is it possible to change the GeoChart colors without specifying a
'number' column?
In the code below, the color defaults to Green when the 'number'
column code remmed out (the colors config option is ignored). However,
if I unremark those lines, the color turns to Red (the colors config
is NOT ignored).
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addRows(5);
data.addColumn('string', 'State');
//data.addColumn('number', 'Number');
data.setValue(0, 0, 'Virginia');
//data.setValue(0, 1, 1);
data.setValue(1, 0, 'Maryland');
//data.setValue(1, 1, 1);
data.setValue(2, 0, 'District of Columbia');
//data.setValue(2, 1, 1);
data.setValue(3, 0, 'California');
//data.setValue(3, 1, 1);
data.setValue(4, 0, 'Texas');
//data.setValue(4, 1, 1);
var geochart = new google.visualization.GeoChart(
document.getElementById('visualization'));
geochart.draw(data, {width: 556,
height: 347,
region: 'US',
resolution: 'provinces',
colors:['red','red']
});
}