Resize in SharePoint

I have a JS1 Gantt chart control in a SharePoint web part, my problem is the sizing of this control. I have given no size settings, just expecting it to use 100% of the containing div. But I keep getting a white area to the right of my Gantt control:

     
I've tried calling resizeWindow but to no avail.

I've tried this with and without enableResize and isResponsive but to no avail.

When I use the SharePoint Focus on Content function to remove the quick launch menu and my Gantt expands to fill the available space, but when I use it again the menu is reinstated but my Gantt keeps it's new size and extends off the page.

Further tests show that this works fine in FireFox.

Do you have any suggestions how I can correct this in a SharePoint environment?

Thanks, Martin

3 Replies

KR Karthikeyan Raja Syncfusion Team March 13, 2020 12:22 PM UTC

Hi Martin, 
 
Sorry for the delay. 
We have analyzed your query. By default Gantt is rendered with 100% width and 450px height. So we suggested you to customize the Gantt dimension as per your need by using sizeSettings property. Please find the code snippet below, 
$("#GanttContainer").ejGantt({  
//...  
sizeSettings:{  
        width: "700px",  
         height: "350px"  
} 
}); 
 Please find the below documentation link for further reference 
 
If you are still facing issue please revert us with your code snippet or issue reproduceable sample, So that will be more helpful to serve you better. 
 
Regards, 
Karthikeyan Raja 



MP Martin Pamplin March 13, 2020 12:52 PM UTC

Thanks. The problem is that when I have two web parts side-by-side dynamically SharePoint is dynamically changing the size of the web part and I cannot get the Gantt to follow. I hoped the window resize might fix it, but SharePoint is not resizing the window, just the web parts therein.

I'm not sure that this can be fixed.

We are telling users to always add Gantts as full-width web parts, which avoids the issue.

You can treat this as closed.

Thanks again.


KR Karthikeyan Raja Syncfusion Team March 16, 2020 04:41 AM UTC

Hi Martin, 
 
Thanks for the update.  
We are happy that your issue has been resolved. Please get back to us, If you need any further assistance. 
 
Regards, 
Karthikeyan Raja 


Loader.
Up arrow icon