Highcharts有一个可爱的图表演示drills down from columns to pies。但是,如果我尝试更换东西以便使用条形而不是馅饼,我会得到bars and then bars,而不是列,然后是条形码:
$(function () {
// Create the chart
$('#container').highcharts({
chart: {
type: 'bar' //change this to "pie" and it works just fine.
},
series: [{
name: 'Things',
data: [{
name: 'Animals',
y: 5,
drilldown: 'animals'
}, {
name: 'Fruits',
y: 2,
drilldown: 'fruits'
}, {
name: 'Cars',
y: 4,
drilldown: 'cars'
}],
type: 'column'
}],
drilldown: {
series: [{
id: 'animals',
data: [
['Cats', 4],
['Dogs', 2],
['Cows', 1],
['Sheep', 2],
['Pigs', 1]
]
}, {
id: 'fruits',
data: [
['Apples', 4],
['Oranges', 2]
]
}, {
id: 'cars',
data: [
['Toyota', 4],
['Opel', 2],
['Volkswagen', 2]
]
}]
}
}) });
当我向下钻取时,是否可以从列切换到条形图?