简体   繁体   中英

How to disable certain option in the exporting option of Highcharts?

I'm using Highcharts and I add the following sript for export option and I would like to disbles the View in full screen , View data table and Open in Highcharts Cloud option.

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

导出选项

You need to remove "viewFullscreen" item from menuItems array:

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

Live demo: http://jsfiddle.net/BlackLabel/6985zcwa/

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM