cancel
Showing results for 
Search instead for 
Did you mean: 
OleksandrB
Sisense Team Member
Sisense Team Member

Disable the functionality that allows users to click on the legend in the widget to filter data

If you want to disable the functionality that allows users to click on the legend in the widget to filter data.

Please use this solution. Open your dashboard, edit the widget press 3 dots in the up-right corner of the widget, and choose Edit Script.

In the new window paste the next code:

 

 

 

widget.on('beforeviewloaded', (scope, args) => {
	for (let type in args.options.plotOptions) {
		if (!args.options.plotOptions[type].events) args.options.plotOptions[type].events = {};
		args.options.plotOptions[type].events.legendItemClick = () => {
			return false;
		}
	}
});

 

 

 


 Press the Save button and check your widget.

Now you can't click on the legend.

Screenshot_17.png

Check out this related content: 
Academy
Documentation

Rate this article:
Version history
Last update:
‎09-05-2024 09:12 AM
Updated by: