Overflow on dashboard panels

I use a dashboard view with several panels in my app.  The panel contain grids, pivotviews, charts, scheduler and spreadsheet controls.  I am having a few issues and would like advice..

1) Occasionally, the dashboard will render all panels in the the top left, overlapping each other.  A refresh of the page will correct it as a workaround.  Is there a way that I can detect this and moreover, call a method to refresh the layout without having the user refresh the whole page?

Image_5666_1695406619437

2) Some control spill over the size of the panels.  Grids seem to obey the height=100% setting, but PIvotViews and SpreadSheets do not.  Is there a way to have the panel scroll whenever the content it too big to fit?
Image_7922_1695406745584


1 Reply

SA SureshRajan Alagarsamy Syncfusion Team September 25, 2023 11:16 AM UTC

Hi John,


Greeting from Syncfusion support.


We have reviewed your query along with shared screenshot and understand that you have concerns in the Dashboard Layout component. We suggest that you follow the instructions below to address these concerns.


Query 1 : Is there a way that I can detect this and moreover, call a method to refresh the layout without having the user refresh the whole page?


To achieve this requirement, we have utilized the Dashboard Layout component's "created" event. In the event handler, we can call the Dashboard Layout component's "refresh" method. This ensures that the Dashboard Layout is rendered properly without any layout issues.


Refer to the below code snippet for further reference.


[index.js]

 

var dashboard = new ej.layouts.DashboardLayout({

  cellSpacing: [10, 10],

  cellAspectRatio: 100 / 85,

  columns:2,

  ....

 

  created: OnCreated,

 

  ....

});

dashboard.appendTo('#defaultLayout');

 

....

 

function OnCreated(args){

  document.getElementsByClassName('e-dashboardlayout')[0].ej2_instances[0].refresh();

}

 


Query 2 : Is there a way to have the panel scroll whenever the content it too big to fit?


To achieve this requirement, we suggest you set the "overflow: auto" style for the content tag. This will ensure that the component rendered inside the panel gets a scrollbar when the height and width exceed the available space.


In addition, we have attached a simple sample for your reference.


Sample : https://stackblitz.com/edit/zfzf8f?file=index.js


Check out the shared details and get back to us if you need any further assistance.


Regards,
Suresh.


Loader.
Up arrow icon