I am a noob in web-development. I'm trying to create a tree-like hierarchical company org chart. I tried both google's visualization chart and Mike Bostock's D3 Reingold tree.
I want these features :
- tree structure : either top-down (google) or left-right (D3)
- online/dynamic : viewable in browser and able to read data from json (both google & D3), not static visio or ppt diagram
- collapsible : able to hide subtrees (both)
- space-adjusting : nodes should fill visible area, to reduce scrolling (only D3)
- attributes : display name, title & possibly picture (only google)
Above I've marked which tool allows which features, afaik.
I prefer the D3 version because it looks cool.
I can modify the .json to include additional fields (title, url to photo etc.) - here is a sample
My question is - how do I modify the D3 code to display an employee's name, then title in the next line, and maybe picture too ?
Or if that's not feasible - how do I modify the google code to automatically adjust spacing, so that all children of a node are close together, and I don't have to horizontally scroll ?