我在高级图表中遇到一个非常大的问题,即使用向下钻取多个系列以及单击后退按钮
这是我正在使用的js函数,我可以在向下钻取时创建多个系列,但在返回时,先前的数据正在与当前数据合并
function hello() {
var odata = [{
name: 'Jan',
y: 50,
drilldown: 'animals'
},
{
name: 'Feb',
y: 52,
drilldown: 'animals'
}
];
$('#container').highcharts({
chart: {
type: 'column',
margin: 75,
options3d: {
enabled: true,
alpha: 15,
beta: 15,
depth: 50,
viewDistance: 25
}
},
title: {
text: 'Employee Leave status, 2013.'
},
subtitle: {
text: 'Click the columns to view more.'
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Total Number'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y}'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y}</b> Number of days<br/>'
},
series: [{
name: 'UN Over-All for year',
colorByPoint: true,
data: odata
},
{
name: 'Pl Over-All for year',
colorByPoint: true,
data: odata
}],
drilldown: {
series: [{
id: 'animals',
name: 'Animals',
data: [{
name: 'Cats',
y: 4,
drilldown: 'cats'
}, ['Dogs', 2],
['Cows', 1],
['Sheep', 2],
['Pigs', 1]
]
},{
id: 'cats',
data: [1, 2, 3]
}]
}
})
}
我需要在每个向下钻取时有多个系列,并且我还有多个钻取
这是小提琴
http://jsfiddle.net/mohamedmusthafac/x5E2Y/1/
只需点击jan-&gt;然后点击任意一个栏 - &gt;然后点击返回&gt;然后点击同一对的另一个栏 - &gt; Bug(系列碰撞)