In Sisense, all legends are enabled by default. Below script can be used to disable one more items in legend when load/refresh the widget (disabling legend means, item will be in gray color and data of disabled item will not displayed in widget. User can enable it by click on it.)
Steps:
Create a Bar/Column/Area/Pie/Line chart and enable Legend
Add below script to widget
Update the variable 'disableLegend' with list of items in legend need to be disabled
Save the script and refresh widget
widget.on('processresult', function(se, ev){
let disableLegend = ['Midwest', 'South']
$.each(ev.result.series, function(index, value){
if(disableLegend.includes(value.name))
value.visible = false
})
})
is it possible to deselct all other items by dubble clicking on the selected item, now you have to click on all the items to deslect or update the variable 'disableLegend' .