We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Javascript/jQuery to force the resize of the dashboard.

Is there a Javascript/jQuery function to force the dashboard to resize its content.

3 Replies

DG Dhivyabharathi Govindaraj Syncfusion Team September 11, 2019 09:59 AM UTC

Hi Jam, 

Could you please let us know whether you want to resize your dashboard content in our Dashboard Platform SDK or in our Bold BI application. We will provide you the suggestion based on your confirmation. 

Thanks, 
Dhivya 



JF Jam Furiscal September 16, 2019 07:33 AM UTC

Hi Dhivya,

Thank you so much for the reply. Its for the Bold BI Application. But I think I figured it out. I am using this code to force the app to resize:

jQuery('#dashboard').ejDashboardDesigner().resize();

Also is there a callback function after creating the dashboard, what I am trying to achieve is to bind a click functionality on 2 buttons inside the dashboard, graph maximize and graph minimize. But if there is an existing callback function when any graph is maximized/minimized then that would be most helpful.

Thanks,

Jam


SR Selvamani R Syncfusion Team September 16, 2019 12:39 PM UTC

Hi Jam, 

Please find the response for your queries.  

jQuery('#dashboard').ejDashboardDesigner().resize(); 
We have provided the resizeDashboard 
API to resize the dashboard.  Please use the below code, 
 
var data=$("#dashboard").data("ejDashboardDesigner"); 
data. resizeDashboard(); 

Also is there a callback function after creating the dashboard, what I am trying to achieve is to bind a click functionality on 2 buttons inside the dashboard, graph maximize and graph minimize. But if there is an existing callback function when any graph is maximized/minimized then that would be most helpful. 
You can use actioncomplete event to get the Maximize/Minimize complete event in view mode.  

var data=$("#dashboard").data("ejDashboardDesigner"); 
data.model.actionComplete = dashboardactioncomplete; 
 
Create call back method in your scripts like as below. 
 
function dashboardactioncomplete(args) 
{ 
if(args.eventType === 'maximizeDialogOpen'){ 
console.log('Maximize completed');} 
if(args.eventType === 'maximizeDialogClose'){ 
console.log('Minimize completed');} 
} 

  
Thanks, 
Selvamani R. 


Loader.
Live Chat Icon For mobile
Up arrow icon