Jel*_*leP 20 jquery highcharts
我们喜欢在Highchart的多层次上向下钻取.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)
}
});
Run Code Online (Sandbox Code Playgroud)
Paw*_*Fus 36
这是可能的,只需添加所有钻取系列,然后在点和钻取之间创建连接.请参阅: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', 2],
['Pigs', 1]
]
}, {
id: 'cats',
data: [1, 2, 3]
}]
}
Run Code Online (Sandbox Code Playgroud)
小智 7
对于多层饼图,请查看http://jsfiddle.net/bge14m3a/1/
$(function () {
// Create the chart
$('#container').highcharts({
chart: {
type: 'pie'
},
title: {
text: 'Deep drilldown'
},
xAxis: {
type: 'category'
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
}
}
},
series: [{
name: 'Things',
colorByPoint: true,
data: [{
name: 'Animals',
y: 5,
drilldown: 'animals'
},{
name: 'Food',
y: 4,
drilldown: 'food'
}]
}],
drilldown: {
series: [{
id: 'food',
name: 'Food',
data: [{
name: 'Apple',
y: 1.5,
drilldown: 'apple'
},
['Banana', 1],
['Peer', 0.5],
['Pineapple', 1]
]
}, {
id: 'apple',
data: [['1/6' ,1],
['1/3' , 2],
['1/2' , 3]]
},{
id: 'animals',
name: 'Animals',
data: [{
name: 'Cats',
y: 5,
drilldown: 'cats'
}, ['Dogs', 2],
['Cows', 1],
['Sheep', 1],
['Pigs', 1]
]
}, {
id: 'cats',
data: [1, 2, 3]
}]
}
})
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
29937 次 |
| 最近记录: |