我目前正在处理此代码,一切正常,但是当我用鼠标悬停一个国家时,我只希望国家名称出现在标签中,而不是相关值。我可以这样做吗?如果是这样,怎么做?
提前致谢!
这是javascript代码:
google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = google.visualization.arrayToDataTable([
['Country', 'Value'],
['Albania', 1],
['Algeria', 1],
]);
var options = {
colorAxis: {colors:['#386a90']}, legend:'none', datalessRegionColor:'#f1f1f1'
};
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);
};
</script>