Forge Component
(7)
Published on 2 Oct by OutSystems R&D
7 votes
Published on 2 Oct by OutSystems R&D

The OutSystems Charts module is based on HighCharts and indeed uses the core javascript modules from HighCharts. One include which is missing is the https://code.highcharts.com/modules/exporting.js file.


The ability to export the graphs as images, pdf, etc is extremely important to our users. Previously we've just used the highcharts forge component as an alternative to the OutSystems graphing options to get around the lack of export support with OutSystems.


Unfortunately, we are unable to do this with our newer modules as HighCharts component is now deprecated and does not support React.


We have attempted multiple different variations of enabling the built in HighCharts export context menu from within the AdvancedJSON of our charts.


For example with the code:

   exporting: {
   buttons: {
       contextButton: {
           enabled: true
       }
   }
}


After realizing nothing seemed to enable the export context menu, I looked into the code on both the front and back ends of the server and indeed, the OutSystems HighCharts does not include the exporting.js HighCharts module, and manually including it on the page does not seem to work with the OS implementation of HighCharts.


Are we missing a simple fix to get this working?


If not, why was this important functionality left out, and when will it be implemented? 



Thank you,
Braxton Bragg

Solution

Quick update.


Using the MoreCharts component as an example, we were able to get this working within React.


To get exports working:

  1. We had to copy the javascript code from the exporting block.
  2. Create a new block within our React module. 
  3. Add a required script to that block.
  4. Under Interface > Scripts we pasted the Highcharts export javascript.
  5. Finally we included this newly created block on the page with our OutSystems Charts.


While doable, there was no documentation anywhere on the OutSystems websites or forums about how to do this. Additionally, in my opinion, this should be included within the charts module by default.


Hopefully this post helps others who wish to export their data.

Solution