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