Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable PDF and SVG download options in Highcharts

Tags:

highcharts

I am using Highcharts v4.0.3 with exporting.js in my web app, and I want to be able to just provide the end user with the following download options:

  • Download Chart as JPG
  • Download Chart as PNG

However, the standard options are:

  • Print Chart
  • Download Chart as JPG
  • Download Chart as PNG
  • Download Chart as PDF
  • Download Chart as SVG Vector Graphic

How can I customise it so that it just gives the user JPG and PNG options?

like image 714
mickburkejnr Avatar asked Aug 10 '14 20:08

mickburkejnr


1 Answers

In chatOptions we can write customize options in the high-charts menu we can customize the dropdown options.
In chart options, we can write like:

exporting: {
    buttons: {
      contextButton: {
        menuItems: ['downloadPNG', 'downloadJPEG', 'downloadPDF', 'downloadSVG'],
      },
    },
}

Example: click here
Reference: click here

like image 98
Krishna Pvs Avatar answered Oct 20 '22 03:10

Krishna Pvs