我有一个地理图表的代码,我试图指定颜色,但工具提示在白色背景上以浅灰色显示。
有什么想法吗?
我在mac上使用chrome版本32.0.1700.107。
<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([
['Country', 'Working days'],
['Greece', 243],
['Ireland', 205],
['United Kingdom', 162],
['Portugal',156],
['Belgium',164],
['Italy',166],
['Luxembourg',153],
['Cyprus',150],
['Finland',145],
['Austria',134],
['Norway',126],
['France',127],
['Netherlands',126],
['Denmark',122],
['Spain',125],
['Sweden',120],
['Czech Rep',164],
['Germany',119],
['Romania',110],
['Bulgaria',100],
['Lithuania',108],
['Slovakia',120],
['Slovenia',103],
['Estonia',79],
['Hungary',104],
['Latvia',73],
['Poland',70]
]);
var options = {
backgroundColor: '#DDDDDD',
sizeAxis: { minValue: 0, maxValue: 250 },
region: '150',
datalessRegionColor: '#AAAAAA',
tooltip: {textStyle: {color: '#444444'}, trigger:'hover'},
colorAxis: {colors: ['green', 'blue']},
legend: 'Days'
};
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);
};
</script>
答案 0 :(得分:0)
我想必须有一种方法来捏造它以迫使风格表现自己。
但如果使用完全不同的技术重新实现整个事物听起来有任何吸引力......你可能会在此之后做类似的事情leaflet choropleth tutorial