Dynamically change panel aspectratio

hello,dear
  i need to dynamically change ejs-dashboardlayout cellAspectRatio when page resize to be sure that all panel full fill page hight.

2 Replies

KO KHALID OMAR MOHHMED April 23, 2020 02:08 AM UTC

i solve it by but dashboard in container div and i write this code to make the dashboard full fill the dive
          
          var dashboardObject = document.getElementById('defaultLayout').ej2_instances[0];
            var aspectRatio = ($('#divContainer').width()) * rows / (dashboardObject.columns * $('#divContainer').height());
            dashboardObject.cellAspectRatio = aspectRatio;
            dashboardObject.refresh();


SP Sowmiya Padmanaban Syncfusion Team April 23, 2020 08:43 AM UTC

Hi Khalid,  
 
Greetings from Syncfusion support. 
 
We are happy to hear that your problem has been resolved. Please contact us, if you need any help from us. We will happy to assist you. 
 
Note: By default, DashboardLayout’s grid panel structure will change to stacked panel structure when the browser screen width goes below 600px). So, in this case, cellAspectRatio will not be considered by Dashboard Layout. 
 
Refer the below links to know more about the DashbaordLayout. 
 
 
 
 
Regards,  
Sowmiya.P 


Loader.
Up arrow icon