我正在为我的dataArray
中的每个国家解析多个职业到我的HighMaps Mapbubble。 Highmaps将它们视为单独的点,并在地图上将它们堆叠在一起。因此,只有最近的职业在地图上可见,因为所有其他职业都堆放在最新职业之后。
有没有办法让这个国家的所有职业都可见?
这是我目前的Highmaps代码:
Highcharts.mapChart('container', {
chart: {
borderWidth: 1,
map: 'custom/world'
},
title: {
text: "Where's everybody from?"
},
subtitle: {
text: 'See where your peers are from and what they do'
},
legend: {
enabled: false
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
series: [{
name: 'Countries',
color: '#E0E0E0',
enableMouseTracking: false
}, {
type: 'mapbubble',
name: 'Occupation: ',
joinBy: ['iso-a2', 'code'],
data: dataArray,
dataLabels: {
allowOverlap:false,
enabled: true,
},
minSize: 1,
maxSize: '10%',
tooltip: {
pointFormat: '{point.occupation}'
}
}]
});
这是我的Firebase JSON导出的摘录,用于显示我拥有的数据格式:
[{
"code" : "PK",
"occupation" : "computer science ",
"z" : 1
},
{
"code" : "PK",
"occupation" : "another computer science occupation",
"z" : 1
},
{
"code" : "US",
"occupation" : "manager ",
"z" : 1
},
{
"code" : "UG",
"occupation" : "test24",
"z" : 1
}]