私は米国の地図とその 600 x 400 を持っています。例で見たが、自分のコードでは再現できない省略形の州名を強制的に使用するにはどうすればよいですか。
以下のコードといくつかのサンプル データを使用して、渡すコードの形式を示します。より大きなjson応答からデータを解析する必要があります。
var data = [{"code":"AK","value":225}, {...} ];
これは地図です:
$('#ha-worst-map-1').highcharts('Map', {
title : {
text : result.data[1][2] + ': ' + result.data[1][4]
},
subtitle : {
text : 'stuff and things'
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'top'
}
},
colorAxis: {
min: 0
},
credits: {
text: '',
href: ''
},
series : [{
data : data,
mapData: Highcharts.maps['countries/us/us-all'],
joinBy: ['postal-code', 'code'],
name: 'metric',
states: {
hover: {
color: '#BADA55'
}
},
dataLabels: {
enabled: true,
format: '{point.name}'
},
tooltip: {
valueSuffix: ''
}
}, {
name: 'Separators',
type: 'mapline',
data: Highcharts.geojson(Highcharts.maps['countries/us/us-all'], 'mapline'),
color: 'silver',
showInLegend: true,
enableMouseTracking: true
}]
});