top of page

Dashboard Refresh Button

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()
	})
}   



364 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
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