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

Better usage of given space #22

Open gossi opened 14 years ago

gossi commented 14 years ago

I created a graph using a Spacetree. I want to show the whole graph, set up maximum level to 100. Fine, but the spacetree is - as it seems to me - expanding to the outer regions and the inner space keeps empty. I have an example here: http://einradfahren.de/index.php?module=mod_trixionary&action=graph On the right grey box under "Graph Einstellungen" click on the "Vollbild" button to see the issue. I give that graph a height of 3200px and still the last items at the bottom are invisible because they go out of bounds, where there is actually enough space to use.

Even though the graph is plotted the way, the data is provided. Actually, in the first level (after root), there is the node called "Rückwärts fahren" which has no adjacencies and could therefore moved to the "outside" of the nodes and the more frequented nodes could show up in the middle. Maybe this would help this issue, if I would draw that graph with pen and paper I would do so.

Thanks

philogb commented 14 years ago

Hi, could you pase the JSON data you're providing to the visualization?

Thanks :)

gossi commented 14 years ago

Sure.

See Issue #23 for another problem with aligning nodes ;)

https://gist.github.com/6fc9b2a1841c15674a86 (dunno if this is now visible to you, let me know. I am new to github)

philogb commented 14 years ago

I formatted the data. This bug might be related to the edges not shown bug, and doesn't seem to be a simple one. But it's important. https://gist.github.com/dafbd23b59255d74dc71

gossi commented 13 years ago

Yay, the more nodes I add, the faster away they spread, see: http://einradfahren.de/trixionary/graph click "Vollbild" on the right side, zoom out a little and pan to the southest - no fun :/ (and I have not even added half of the nodes there).

Meanwhile, I found this graph at Khan Academy: http://www.khanacademy.org/exercisedashboard Is that possible with JIT - would love to do that.

philogb commented 13 years ago

Seems like a static graph... I;m not sure. I was thinking the other day that the layout problem with the Spacetree may have to do with the order the edges are traversed... if they where always traversed in the same order we may not have the problems you're having with the nodes. Maybe you can try adding weights to the edges and try to change the ST layout algorithm to traverse edges in weight order?

I'm currently busy with other things and, as much as I would like to work on InfoVis, it might take some time until I make a big release. I do intend to make some patch releases, and if you fix that then I would definitely include that in the release.

On Sat, Sep 3, 2011 at 4:36 AM, gossi reply@reply.github.com wrote:

Yay, the more nodes I add, the faster away they spread, see: http://einradfahren.de/trixionary/graph click "Vollbild" on the right side, zoom out a little and pan to the lowest - no fun :/ (and I have not even added half of the nodes there).

Meanwhile, I found this graph at Khan Academy: http://www.khanacademy.org/exercisedashboard Is that possible with JIT - would love to do that.

Reply to this email directly or view it on GitHub: https://github.com/philogb/jit/issues/22#issuecomment-1986341

Nicolas Garcia Belmonte - http://philogb.github.com/

philogb commented 13 years ago

Like you may traverse the graph from the root node with a BFS algorithm (I think there's already that in the Graph class) and tag the edges for the BFS and then take all the non-tagged edges (that would make the tree a non-tree but a grsaph) and add a big weight to them. Then the layout algorithm would choose the lowest weighted edges, first -or "only"- ... I think that should work

On Tue, Sep 6, 2011 at 9:52 PM, Nicolas Garcia Belmonte philogb@gmail.com wrote:

Seems like a static graph... I;m not sure. I was thinking the other day that the layout problem with the Spacetree may have to do with the order the edges are traversed... if they where always traversed in the same order we may not have the problems you're having with the nodes. Maybe you can try adding weights to the edges and try to change the ST layout algorithm to traverse edges in weight order?

I'm currently busy with other things and, as much as I would like to work on InfoVis, it might take some time until I make a big release. I do intend to make some patch releases, and if you fix that then I would definitely include that in the release.

On Sat, Sep 3, 2011 at 4:36 AM, gossi reply@reply.github.com wrote:

Yay, the more nodes I add, the faster away they spread, see: http://einradfahren.de/trixionary/graph click "Vollbild" on the right side, zoom out a little and pan to the lowest - no fun :/ (and I have not even added half of the nodes there).

Meanwhile, I found this graph at Khan Academy: http://www.khanacademy.org/exercisedashboard Is that possible with JIT - would love to do that.

Reply to this email directly or view it on GitHub: https://github.com/philogb/jit/issues/22#issuecomment-1986341

Nicolas Garcia Belmonte - http://philogb.github.com/

Nicolas Garcia Belmonte - http://philogb.github.com/