Hai,
I have created geoChart of US by using below code . While clicking on any region I would like to change the backgroud color of the clicked region. I am able to trigger the region click event . Please help to change the background color of the clicked region .
<html>
<head>
<script type='text/javascript' src='
https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([['State']]);
var options = {
region: 'US',
displayMode: 'region',
colorAxis: {colors: ['orange', 'blue']},
datalessRegionColor:'F5F5F5',
enableRegionInteractivity:true,
resolution:'provinces'
};
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);
google.visualization.events.addListener(chart, 'regionClick', function(res){
//var country_data = chart.getSelection();
//chart.setSelection();
});
};
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
Thanks in Advance
Regards,
Kutti