Craig Thomas
Craig Thomas

Reputation: 89

HighCharts Hide specific context Menu items

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.

Upvotes: 3

Views: 2775

Answers (1)

morganfree
morganfree

Reputation: 12472

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.

Upvotes: 4

Related Questions