cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Widget

gwolfe
9 - Travel Pro
9 - Travel Pro

Hi, I referenced this post to arrange widgets https://community.sisense.com/t5/build-analytics/arranging-widgets-in-a-dashboard/m-p/2827

I want the widgets I am referencing to remain on the same dashboard, but I want to hide them so that they are only displayed in the blox widget. 

Is there a script to hide widgets based on their ID?

 

 

 

 

1 ACCEPTED SOLUTION

harikm007
12 - Data Integration
12 - Data Integration

Hi @gwolfe ,

Here is a post on how to hide widget from dashboard

https://www.binextlevel.com/post/hide-widgets-from-a-dashboard

Script:

dashboard.on('widgetrefreshed', function (se, ev) {

	widgetList = ['625e34a5aer456002ea7b64d', '6789cdc6fa34563002er56456']
	
	if(widgetList.includes(ev.widget.oid))
	{
		$(`widget[widgetid="${ev.widget.oid}"]`).closest('.dashboard-layout-subcell-host').addClass('dontshowme-parent')
	}
});

-Hari

View solution in original post

2 REPLIES 2

harikm007
12 - Data Integration
12 - Data Integration

Hi @gwolfe ,

Here is a post on how to hide widget from dashboard

https://www.binextlevel.com/post/hide-widgets-from-a-dashboard

Script:

dashboard.on('widgetrefreshed', function (se, ev) {

	widgetList = ['625e34a5aer456002ea7b64d', '6789cdc6fa34563002er56456']
	
	if(widgetList.includes(ev.widget.oid))
	{
		$(`widget[widgetid="${ev.widget.oid}"]`).closest('.dashboard-layout-subcell-host').addClass('dontshowme-parent')
	}
});

-Hari

gwolfe
9 - Travel Pro
9 - Travel Pro

Perfect, thank you