score:14

Accepted answer

You can still use the menuItems with the extra values from export-data.js.

The complete list, with "data table", is this (JSFiddle):

["printChart",
"separator",
"downloadPNG",
"downloadJPEG",
"downloadPDF",
"downloadSVG",
"separator",
"downloadCSV",
"downloadXLS",
"viewData",
"openInCloud"]

Just remove "viewData" and any other values you do not need.

You could specifically remove it from the array, but this seems less ideal (JSFiddle):

Highcharts.chart('container', {
    // ...
}, function(chart) {
    var arr = chart.options.exporting.buttons.contextButton.menuItems;
    var index = arr.indexOf("viewData");
    if (index !== -1) arr.splice(index, 1);
});

Related Query

More Query from same tag