我们喜欢在Highchart的多个层次上进行Drilldown.在Highchart中有没有例子?
目前使用的代码:
$(div).highcharts({ chart: {type: 'column'},credits: {enabled: false},title: {text: title},xAxis: { categories: [ 'Instroom','Rijdend','Úitstroom' ] },yAxis: {title: {text: ytitle}},legend: {enabled: true},plotOptions: {series: { borderWidth: 1,dataLabels: {enabled: true,}}},series: first,drilldown: { series: drillDownObject(second) } });
解决方法
这是可能的,只需添加所有的钻取系列,然后创建点和向下钻取之间的连接.见:
http://jsfiddle.net/6LXVQ/2/
series: [{ name: 'Things',colorByPoint: true,data: [{ name: 'Animals',y: 5,drilldown: 'animals' }] }],drilldown: { series: [{ id: 'animals',name: 'Animals',data: [{ name: 'Cats',y: 4,drilldown: 'cats' },['Dogs',2],['Cows',1],['Sheep',['Pigs',1] ] },{ id: 'cats',data: [1,2,3] }] }