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']
});
}
--
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.