0
我正在使用HighCharts GeoMaps。我感興趣的世界地圖繪製以下區域:如何繪製使用HighCharts GeoMaps的區域?
- 東亞&太平洋
- 歐洲&中亞
- 拉丁美洲&加勒比海
- 中東&北非
- 北美
- 南亞
有沒有人試過這個?如果有人爲此提供解決方案,請提供小提琴。
在此先感謝。
編輯:
我探索highmaps例子,我創建了一個fiddle來解決問題。在上面的小提琴中,地區被錯誤地繪製,也沒有呈現完整的世界地圖。有人可以指出我出錯的地方嗎?
$(function() {
// Prepare demo data
var data = [
{
"region": "South America",
value: 3
},
{
"region": "East Asia & Pacific",
value: 10
},
{
"region": "Europe & Central Asia",
value: 12
},
{
"region": "Latin America & Caribbean",
value: 8
},
{
"region": "Middle East & North Africa",
value: 9
},
{
"region": "North America",
value: 20
},
{
"region": "South Asia",
value: 17
}
];
// Initiate the chart
$('#container').highcharts('Map', {
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {
min: 0
},
series: [{
data: data,
mapData: Highcharts.maps['custom/world'],
joinBy: ["region-wb","region"],
allAreas: true,
name: 'Random data',
states: {
hover: {
color: '#BADA55'
}
},
dataLabels: {
enabled: true,
format: '{point.name}'
}
}]
});
});
您是否探索過http://www.highcharts.com/maps/demo highmap示例? –
你也可以看看HighMaps地圖集http://code.highcharts.com/mapdata/ –