OrgChart icon indicating copy to clipboard operation
OrgChart copied to clipboard

Charts aren't correctly displayed when the fixed width CSS constraint is relaxed

Open yurivict opened this issue 3 years ago • 3 comments

Sometimes data has different width and having fixed width is impractical.

When this line is commented out charts aren't shown correctly when there is only one child:

image

Another example is: image

yurivict avatar Dec 19 '22 09:12 yurivict

Hi @yurivict , I had similar problem and I think I managed to solve it.

1

I did not comment out the width, instead I replaced it with this: width:100%; min-width:130px;. After this I added flex-grow:2; in .orgchart .hierarchy.

2

DCH1 avatar Dec 22 '22 11:12 DCH1

Hi @yurivict @DCH1 I have created new 30 demo on gh-pages for you -- nodes of different widths(https://dabeng.github.io/OrgChart/nodes-of-different-widths.html)

dabeng avatar Dec 26 '22 02:12 dabeng

but in demo withs not semmes works .....

Paul75 avatar Sep 28 '23 09:09 Paul75