Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HighCharts Hide specific context Menu items

Tags:

highcharts

I would like to hide specific menu items from the HighCharts context menu. Can someone point me to an example of how to do that.

Thanks.

like image 613
Craig Thomas Avatar asked Jul 24 '26 05:07

Craig Thomas


1 Answers

exporting.buttons.contextButton.menuItems - this is a property in which you define items for the exporting menu. Highcharts.defaultOptions.buttons.contextButtons.menuItems is an array with predefined menu items, so you copy and modify it.

exporting: {
        buttons: {
            contextButton: {
                menuItems: Highcharts.defaultOptions.exporting.buttons.contextButton.menuItems.slice(4,5)
            }
        }
    }

example: http://jsfiddle.net/ta9mtap1/

See API Docs - Menu Items.

like image 64
morganfree Avatar answered Jul 27 '26 03:07

morganfree



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!