I am using MVC and currently working with highchart
I am using the Exporting.js so users can print or export the highchart chart. I have two charts in a view and I would like to disable print and export on one of the chart. How can I do that?
Exporting.js is automaticly giving charts these 2 button options.
Thanks in dvance
Correct solution:
.SetExporting(new Exporting { Enabled = false, EnableImages = false });
See the following 'Exporting module is loaded but disabled' for how to disable exporting. An explanation of all of the modifiable options for exporting can be found here.
EDIT
It looks like you are using DotNet.Highcharts. Here is an example on how to use and set the exporting features:
The below works for the MVC 5 and Highsoft.Highcharts I added it before this line:
Title = new Title { Text = "charts" },
You can disable both the buttons (i.e. the whole exporting section) simulataneously by,
You can also disable any one or both of them like this,
The first option that you mention:
breaks the highcharts object, if you are using it in a scenario in which you reuse the html container (ie refreshing data).
the only viable option for me in that scenario is combining both: