Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When using Highcharts, 'graph export' functionality is enabled by default, displayed as a burger menu on the chart. See https://api.highcharts.com/highcharts/exporting
There may be cases where this functionality is not required.
Proposed resolution
Add functionality to disable this functionality when not required.
There are other options related to exporting that may be added as well as this option.
Comment | File | Size | Author |
---|---|---|---|
#2 | Screen Shot 2018-02-12 at 12.58.27.png | 8.43 KB | John Cook |
#2 | Screen Shot 2018-02-12 at 12.55.57.png | 8.26 KB | John Cook |
#2 | 2944125-disable_exporting-2.patch | 4.05 KB | John Cook |
Comments
Comment #2
John Cook CreditAttribution: John Cook at Creode commentedI created a patch that adds this option to disable exporting.
A new
ExportingOptions
class was created to hold this setting and possibly other settings related to the exporting functionality. The class can accept an array on construction and use that to populate its properties.To disable the exporting functionality the code like the following should be used:
When this is done to the example chart it looks like:
Before patch:
After patch:
Comment #3
John Cook CreditAttribution: John Cook at Creode commentedComment #5
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedComment #6
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commented