gpt4 book ai didi

Highcharts -- 导出、设置 dataLabel 选项

转载 作者:行者123 更新时间:2023-12-03 17:53:27 26 4
gpt4 key购买 nike

我使用的是 Highcharts 2.3.5。在“导出”对象中的“chartOptions”下,我可以在导出时更改一些内容,例如图表的背景颜色,但我无法启用 dataLabels 或更改标记大小。

这是一个例子,什么有效,什么无效。在这种情况下,导出时,我想更改背景颜色(有效)并确保出现数据标签(无效):
...

    exporting : {
chartOptions : {
chart: { backgroundColor: '#ff0000'}, //this works
plotOptions: {
pie : {
dataLabels: {enabled: true} //this one doesn't work
}
}
}...

我错过了一些明显的东西吗?
j

最佳答案

$('#container1').highcharts({
exporting: {
chartOptions: { // specific options for the exported image
plotOptions: {
series: {
dataLabels: {
enabled: true
}
}
}
},
scale: 3,
fallbackToExportServer: false
},

关于Highcharts -- 导出、设置 dataLabel 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15208082/

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