Update and add new Highcharts modules for use in Sisense plugins
Summary: Jeremy Friedel provides details on how to update and add new Highcharts modules in Sisense plugins. They explain that Sisense uses Highcharts in many widgets and plugins, and that while Sisense doesn't always update the Highcharts version with each release, users can load additional functionalities via JS module files. They give a step-by-step guide on sourcing modules directly in the "plugin.json" file, determining the current Highcharts version, and using URL formats to find and implement new modules.
The JavaScript library framework Highcharts is natively included in Sisense and is utilized in many native Sisense widgets as well as in numerous Sisense plugins.
Although Sisense typically does not alter the Sisense Highcharts library version with every release, the versions of Highcharts included in Sisense may change when upgrading to a new major version release.
Highcharts can load additional chart types and other types of functionality via JS module files that contain code-adding features such as additional chart types, which can be used within plugins along with additional code to create additional widget types.
If a plugin utilizes a Highcharts module, you can source the module directly in the "plugin.json" file's source parameter, as shown in this example:
To determine the current Highcharts version being used in your Sisense version, you can use the "Highcharts" command in the web console while viewing any page on your Sisense server.
After identifying the current Highcharts version, you can find the corresponding module hosted on a Highcharts code hosting website using the following URL format:
https://cdn.jsdelivr.net/npm/highcharts@${Highcharts_Version}/modules/${module_name}.js
For example:
https://cdn.jsdelivr.net/npm/highcharts@10.3.3/modules/heatmap.js
You can save this module and upload it to the plugin folder or replace the older module JS file simply by copying and pasting the code directly. Be sure to update the "plugin.json" file to point to the new module file if the file name has changed or if this is the first time the module is included.
Simply sourcing the module file in the "plugin.json" file is sufficient to load the module into Highcharts; no further code is required to load the module.
Jeremy Friedel
OP1 year agoRelated article - Loading Amchart5 and Other External Libraries via Script Tags in Plugins
Bharath2106
·1 year agoHi Jeremy, Can you please let me know on how to import am5(amcharts5) modules for use in Sisense Plugins.