Adjust OrgChart to width of Page dynamically


#1

Hey Guys,

Is it possible to adjust the width of the org chart dynamically when I’m expanding nodes or after I search for people and open their org chart? I’ve seen the article to adjust the width on initial load but dont get where I have to call this function when I open some person through the quick search.

Thanks for your help!


#2

Hi @JoshMohr,

Could you clarify your scenario? By adjusting width do you mean adjusting the scale of the web part?

If you want to be sure that employees always fit your page I recommend you to use top to bottom compact layout. You can set the number of columns for layout. For example 4. Then Org Chart will always display 4 columns max.


#3

Hey @antonkhrit,

yeah for sure, sorry for beeing not clear enough! I’ve read this article https://plumsail.com/sharepoint-orgchart/docs/automatically-scale-boxes-fit-visible-area/ and we want that behaviour everytime not only on initial load. As I am writing this and think more about it I’m actually not sure if that would improve the user experience as much as I thought. The boxes obviously would change their size everytime. So I quess you can forget about that :smiley: