top of page

Hide widgets from a dashboard

Here is a script to hide one or widgets from a dashboard.


(Its possible to modify the script so that a widget can be hide/unhide based on some condition or value selected in a filter)



Steps:

  1. Add below script to dashboard

  2. Update the variable 'widgetList' with list of widget to hide

  3. Save the script and refresh dashboard


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')
	}
});


2 комментария

Оценка: 0 из 5 звезд.
Еще нет оценок

Добавить рейтинг
user
08 февр. 2023 г.

Hi,


What would the code look like to add in logic to hide a widget based on a group?

Лайк
BI Next Level
BI Next Level
08 февр. 2023 г.
Ответ пользователю

Are you looking for this? https://www.binextlevel.com/post/hide-widgets-based-on-selected-filters

Лайк
BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page