高图-导出,设置dataLabel选项

jkg*_*000 5 highcharts

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

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

    exporting : {
        chartOptions : {
              chart: { backgroundColor: '#ff0000'}, //this works
              plotOptions: {
                    pie : {
                               dataLabels: {enabled: true}  //this one doesn't work
                            }
              }                         
}...
Run Code Online (Sandbox Code Playgroud)

我是否缺少明显的东西?Ĵ

小智 0

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