gpt4 book ai didi

jquery - Highcharts,钻取时添加 'go back'(向上钻取)按钮

转载 作者:行者123 更新时间:2023-12-01 01:07:59 24 4
gpt4 key购买 nike

如何实现此 http://jsfiddle.net/highcharts/Vf3yT/ 中的“<返回”按钮(点击饼图)到这个http://jsfiddle.net/neFYY/ (新 3.0 Highcharts)?

Highcharts.setOptions({
lang: {
drillUpText: '◁ Back to {series.name}'
}
});

最佳答案

让我们说清楚:

因此,如果您想将插件与第一个图表一起使用,您需要为该插件传递正确的结构,即:

drilldown: {
activeAxisLabelStyle: {
cursor: 'pointer',
color: '#039',
fontWeight: 'bold',
textDecoration: 'underline'
},
activeDataLabelStyle: {
cursor: 'pointer',
color: '#039',
fontWeight: 'bold',
textDecoration: 'underline'
},
animation: {
duration: 500
},
series: [{
id: 'fruits',
name: 'Fruits',
data: [
['Apples', 4],
['Pears', 6],
['Oranges', 2],
['Grapes', 8]
]
}, {
id: 'cars',
name: 'Cars',
data: [{
name: 'Toyota',
y: 4,
drilldown: 'toyota'
},
['Volkswagen', 3],
['Opel', 5]
]
}, {
id: 'toyota',
name: 'Toyota',
data: [
['RAV4', 3],
['Corolla', 1],
['Carina', 4],
['Land Cruiser', 5]
]
}]
},

及系列:

series: [{
name: 'Overview',
colorByPoint: true,
data: [{
name: 'Fruits',
y: 10,
drilldown: 'fruits'
}, {
name: 'Cars',
y: 12,
drilldown: 'cars'
}, {
name: 'Countries',
y: 8
}]
}]

关于jquery - Highcharts,钻取时添加 'go back'(向上钻取)按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16941011/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com