angulard3.jstree

How to draw a dynamic Horizontal tree with expandable div?


Expandable div

Using angular 5, I need to draw a horizontal tree.

where I have to implement those line which should have dynamic as every box could have expanded.

So far I have implemented those boxes but no idea how to draw those line which will bind to the boxes whenever they expanded.

I was trying to do with d3js. but as I am new in d3 I would be glad if you could give me an idea which function or method would be appropriate for that kind of line


Solution

  • You can use primeng horizontal tree, which gives you same structure which you have drawn. The link is https://www.primefaces.org/primeng/#/tree. The another library i found is ngx-graph. Please use the following link. https://swimlane.github.io/ngx-graph/

    enter image description here The Image of primeng horizontal table with expand/collapse.