philogb / jit

The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web
http://thejit.org
Other
1.51k stars 297 forks source link

SpaceTree problem #98

Open arcodergh opened 12 years ago

arcodergh commented 12 years ago

Hi, First thanks for your great work in the development of JIT, its a really a great tool. I work with JIT to produce dynamic visualizations of hierarchical data for my thesis work, in many scenarios JIT works very well, however, sometimes specifically where the hierarchical data has multiple inheritance the visulization fails and produce an unpredictable output. I'm not an experimented javascript developer, so if you can help me with some advices about how to fix that behaviour i'll be totally gratefull. PD: With multiple inheritance I mean that one node has more than one parent. Thanks in advance.

thedustyrover commented 12 years ago

I have the same problem. My temporary workaround is to use the onBeforePlotNode() hook to adjust the position of each, which is OK if your possible tree structures are limited.

theSociableme commented 12 years ago

Same problem. I have created a jsfiddle that displays the problem. http://jsfiddle.net/mwagner72/TtSSZ/

Click the "MS SQL" node, then one of its children to see the problem.

@thedailynathan - Can you post your workaround?

philogb commented 12 years ago

Thanks for the info, I'm aware of this and I would have to change the layout algorithm to fit DAGs. This in turn would affect the collapsing/expanding subtrees behavior, so I'm kind of locked. I'll look into it but for now I think that restricting Spacetree to proper trees is the only way to go unless some custom code is added.