1
我有2个系列,你可以看到下面。Highmaps多个系列不能看到没有禁用一个
<script src="https://code.highcharts.com/maps/highmaps.js"></script>
<script src="https://code.highcharts.com/maps/modules/exporting.js"></script>
<script src="https://code.highcharts.com/mapdata/countries/tr/tr-all.js"></script>
<div id="container"></div>
$(function() {
Highcharts.mapChart('container', {
chart: {
spacingBottom: 20
},
title: {
text: 'Multiple Map Series'
},
legend: {
enabled: true
},
plotOptions: {
map: {
allAreas: true,
// joinBy: 'code',
mapData: Highcharts.maps['countries/tr/tr-all'],
tooltip: {
headerFormat: '',
pointFormat: '{series.name}-{point.name}: <b>{point.value}</b>'
}
}
},
series: [{
name: 'AAA',
data: $.map(['tr-an','tr-iz'], function (code) {
return { "hc-key": code , value : 150};
})
},
{
name: 'BBB',
data: $.map(['tr-ib','tr-or'], function (code) {
return { "hc-key": code , value : 122};
})
}
]
});
});
jsfiddle is here; http://jsfiddle.net/usrt1Lrr/5/
第一个系列(AAA)包含2个城市的'tr-an'和'tr-iz'。
第二个系列(BBB)包含2个城市的'tr-ib'和'tr-or'。
2系列不能被看到,除非我通过图例禁用一个。如果您禁用BBB系列; AAA将可见。这是没有意义的。
我该如何解决这个问题?所有系列必须一起看
在此先感谢。
谢谢,解决了我的问题 – user2761286