top of page

Dashboard Refresh Button

Updated: Dec 13, 2024

In order to refresh all widgets in a dashboard, we need to refresh the entire page. But we can add a button to refresh all widgets.


Here is a script to add refresh button for a dashboard.




Steps:

  1. Create dashboard

  2. Add below script to dashboard

  3. Save the script and refresh the dashboard


dashboard.on('initialized', function (se, ev) {
	
	let dashboardRefreshButton = 
		`<button id="dashboard-refresh-button"title="Refresh" class = "btn js--btn-action" style="width: 34px; height:28px">
		 ↻
		 </button>`
	
	let $toolbarRight = $('.prism-toolbar__section--right .prism-toolbar__cell.btns-holder');
	$toolbarRight.prepend(dashboardRefreshButton);

	$toolbarRight.find('#dashboard-refresh-button').on('click', dashboardRefresh);
})

function dashboardRefresh() {	
	$.each(dashboard.widgets.$$widgets, function(index, value){
		value.refresh()
	})
}   



Comentarios

Obtuvo 0 de 5 estrellas.
Aún no hay calificaciones

Agrega una calificación
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