如何在Highcharts的导出选项中禁用某些选项?

时间:2019-08-26 11:01:03

标签: javascript highcharts

我正在使用Highcharts,我添加了以下用于导出的清单选项,我想取消使用View in full screenView data tableOpen in Highcharts Cloud选项。

<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>

Exporting option

1 个答案:

答案 0 :(得分:1)

您需要从"viewFullscreen"数组中删除menuItems项:

exporting: {
    buttons: {
        contextButton: {
            menuItems: [
                'printChart',
                'separator',
                'downloadPNG',
                'downloadJPEG',
                'downloadPDF',
                'downloadSVG'
            ]
        }
    }
}

实时演示: http://jsfiddle.net/BlackLabel/6985zcwa/

API参考: https://api.highcharts.com/highcharts/exporting.buttons.contextButton.menuItems

相关问题