Hi Hari,
This is great stuff! Thank you for sharing!
Few notes worth knowing about the topic of switching measurements:
Use with Caution
- The script is based on the renderer class of the highcharts library that many of Sisense's charts are based on.
- This means that if it's not working on a specific chart type like treemap, sunburst and etc' then it won't work.
- Also note that Sisense is using a fairly old version of the highcarths library so there are a few outstanding legacy issues with this feature that might occur from time to time.
- Using this feature of highcharts is a great approach but should be used with proper caution and you should properly test this script on your different widgets as in some layouts and screen sizes those issues would be detected.
Other Free Alternatives
A few great materials/scripts/plugins that should be reviewed that would get assist you in doing similar things but in different ways:
The Measure Changer Widget
Changing Measures In The Entire Dashboard Using Blox User Interface
Generally speaking, if you looking for a free alternative and don't mind doing some scripting work, we would recommend going with the BloX alternative as this approach is officially supported by Sisense.
As switching measurements is an extremely popular request and therefore would be used in a large number of widget instances and dashboards - you should wrap this script as a plugin or use our premium Widget Script Manager plugin instead.
It's an amazing plugin that allows you to manage all your widget scripts in one centralized place and choose where and how they would be triggered by using a smart triggering engine.
* It also comes bundled with 50+ (supported) common script samples to expedite your scripting work and Financial formatting over Pivots (and other widget types) is one of them
Advanced Measure Changer (premium alternative)
We developed a great premium plugin named Advanced Measure Changer which allows you to easily add buttons, dropdowns, and other UI elements to all widget types and manage their options in one centralized place without using any scripts or code.
Feel free to reach out of you have further questions, we're always happy to help (:
[email protected]
Paldi Solutions - Number #1 Sisense Plugins Developer