Get OrgChart to use 100% of the screen width

1 Answer 23 Views
OrgChart
Alfred
Top achievements
Rank 1
Alfred asked on 15 Feb 2025, 05:32 PM

Hi,

We're using the org chart component and the data binding works great and we love the template capabilty. But the org only uses a portion of the width of the display and as we have a large organization it would be better if it could use the full amount. I tried this:

.HtmlAttributes(new {style="width:100%"})

but it didn't seem to change anything. What am I missing on this? Thanks!

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 19 Feb 2025, 05:33 PM

Hi Alfred,

The OrgChart by default has width:100% set to its wrapping element. You can inspect it here: https://netcorerepl.telerik.com/czYmbXvh17t3BN0112

You can further verify this by reducing or increasing the size of the right pane in the example I linked. The OrgChart div element highlighted above will resize accordingly with the size of the pane (or the respective container the component is nested in an application different the REPL sandbox I used for demo). 

As for the nodes themselves, they have a default width of 300px and do not resize based on the screen size, because their position has to be precisely calculated internally, to ensure the connecting lines match and child nodes are rendered properly under their parents (a parent can have a different number of child nodes).

Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
OrgChart
Asked by
Alfred
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or