Disable the functionality that allows users to click on the legend in the widget to filter data
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.
Check out this related content:
Academy
Documentation
Published 09-05-2024
OleksandrB
Sisense Employee
Joined October 04, 2023
AssafHanina
Sisense Employee
Joined January 30, 2023