export-csv
export-csv copied to clipboard
Provide a way to disable the plugin if it's loaded on a page
I sometimes have multiple charts on the same page where only some of them should be exportable to CSV/XLS, but all of them can be exported to PNG or other image types.
Can there be an option added to this plugin to disable CSV/XLS export so the CSV/XLS items are not added to the exporting menu button? Perhaps exporting.csv.enabled?
I have tried setting this option, but it still lets me export an empty file:
plotOptions:{
series: {
includeInCSVExport: false
}
}
Currently, the menu items are not pushed to each chart item, but to the default options for menu items. So in order to implement this we would need to change the menu items are handled in the options.
You can do this currently by adding chart-specific menuItem options, so that you slice away the last two items for individual charts:
exporting: {
buttons: {
contextButton: {
menuItems: Highcharts.getOptions().exporting.buttons.contextButton.menuItems.slice(0, 6)
}
}
}
That's exactly what I was looking for. Thanks!