我有这个非常简单的代码:
https://gist.github.com/ndemir/9902237
<html>
<head>
<script type='text/javascript' src='http://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load("visualization", "1", {packages:["geomap"]});
google.setOnLoadCallback(drawChart_ucGChart_chart_div);
function drawChart_ucGChart_chart_div() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'City');
data.addColumn('number', 'Popularity');
data.addRows([
["TR-35", 75],
["TR-33", 34]
]);
var options = {
"height":500,
"width":800,
"dataMode":"regions",
"region":"TR",
"colors": [0xFF8747, 0xFFB581, 0xc06000] //orange colors
}
var chart = new google.visualization.GeoMap(map_canvas);
chart.draw(data, options); return chart;
}
</script>
我想用不同的颜色绘制每个城市,怎么做?