我有一个饼图,我想添加地图下钻系列。怎么样?
http://jsfiddle.net/u03oddrg/1/
$('#things-in-brazil').highcharts({
chart: { type: 'pie'},
series: [{
name: 'Things in Brazil',
data: [
{ name: 'Thing 1', y: 1500 },
{ name: 'Thing 2', y: 2600 }
]
}]
});
var data_for_thing1 = [
{ "hc-key": "br-pa", value: 110 },
{ "hc-key": "br-sc", value: 210 },
{ "hc-key": "br-ap", value: 340 },
{ "hc-key": "br-ba", value: 480 },
{ "hc-key": "br-mt", value: 90 }
];
$('#thing1-by-state').highcharts('Map', {
mapNavigation: { enabled: false },
series : [{
data : data_for_thing1,
mapData: Highcharts.maps['countries/br/br-all'],
joinBy: 'hc-key',
name: 'Thing 1',
states: { hover: { color: '#BADA55' } },
dataLabels: { enabled: true, format: '{point.name}' }
}]
});