ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
521 stars 139 forks source link

Questions #57

Closed piyushparkash closed 7 years ago

piyushparkash commented 7 years ago

Hi Erik,

Thanks for creating this. I was looking for this for years. I want to start using this in my project. I have few questions though. I have not tried it and I am not familiar with d3 so the question may be dumb.

Can we use like styles on hover?

I have lots of Family Data to display. So how it handles overflow, Will it try to confine it in the given height width? or it will overflow and then user can drag to go to certain node?

Can we center a node? Like from JavaScript move the whole tree so that any given node can come center of the div?

Thanks in advance.

ErikGartner commented 7 years ago

Hi!

Cool, hope it works out for you. :-)

The nodes are html divs. You can apply custom css classes to them so that should be all needed to style them for hovering.

The graph is draggable and zoomable, see the demo: https://jsfiddle.net/tpde0cer/226/

You can't center nodes using an javascript api. There is an open feature request (#20) for that though, feel free to make pull request!

Cheers