ハイマップを使用して世界地図を作成しました。ここにコードがありますhttp://jsfiddle.net/zhaojun08/jnmoyzgL/2/
$(function () {
// Prepare demo data
var data = [
{
"hc-key": "fo",
"value": 0
},
{
"hc-key": "um",
"value": 1
},
{
"hc-key": "us",
"value": 2
}
];
// Initiate the chart
$('#container').highcharts('Map', {
title : {
text : 'Highmaps basic demo'
},
subtitle : {
text : 'Source map: <a href="http://code.highcharts.com/mapdata/custom/world-highres.js">World, Miller projection, high resolution</a>'
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
colorAxis: {
min: 0
},
legend: {
enabled: true
},
series : [{
data : data,
mapData: Highcharts.maps['custom/world-highres'],
joinBy: 'hc-key',
name: 'Region',
states: {
hover: {
color: '#BADA55'
}
},
dataLabels: {
enabled: false,
format: '{point.name}'
},
tooltip: {
pointFormat: '{point.name}'
}
},{
type: 'mappoint',
name: 'Cities',
marker: {
fillColor: 'white',
lineColor: 'black',
lineWidth: 1,
radius: 2
},
data: [{
name: 'Mountain View',
lon: -122.07,
lat: 37.40
}]
}]
});
});
ただし、マップの凡例には 2 つの部分があります。1 つは dataRange の左側の部分で、もう 1 つは 'server' の右側の部分です。純粋なマップを作成したいので、左側の部分を削除して右側の部分を予約します。
私は何をすべきか?ありがとうございました!