wesnolte / jOrgChart

A jQuery plugin to draw tree-like structures such as OrgCharts.
989 stars 675 forks source link

How to make the Node which has no child closer to Parrent? #65

Open dungla2011 opened 9 years ago

dungla2011 commented 9 years ago

Please see the image Thank you much!

01

dungla2011 commented 9 years ago

Any idea?

navido commented 9 years ago

+1

dabeng commented 8 years ago

Hi @dungla2011 @navido . I think this demand will conflict with the core idea of jOrgChart that is making use of html table tag to build up orgchart, one td contains one node. If you were to reduce the distance between two sibling nodes according to your thought, the table layout will be destroyed.

While, I got another solution based on OrgChart(you can regard it as 2nd-generation of jOrgChart). With the help of option "direction", we can get a horizontal orgchart. On that moment, node which has no child will be closer to its parent. This is the demo . The following is a snapshot. left2right Good luck! :blush: