Forums

Full Version: applying layouts on distinct graphsubsets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good morning,

hope all are well.
This demo is the result of my further investigation into the possibility of applying different layouts on distinct subsets of the same underlying graph.

This demo displays its graph as follows
  • nodes within a distance of 2 from the last clicked node are displayed according to the RadialTreeLayout
  • further nodes are arranged around this radial graph according to the CircleLayout

The demo uses modifications of the CricleLayout and RadialTreeLayout in order to achieve this. These modifcations enable their user to specify filter methods in order to restrict the nodes to be handled by the layouts.

Obviously the demo does what was desired. Nevertheless please be aware that the modifications of the layouts are not tested to be of general usage, they were just modified to fulfill the purpose of this specific “proof of concept” demo. (filtering according to tree depth ...)

I hope a filtering/predicate feature like that will at one point be part of the flare lib, the range of possibilities springing from layouts on graph subsets seem to be very promising.

Feedback as usual most welcome

[attachment=197]

cheers

martin


this demo in action

requires flare version 2008.07.29 or higher
I wasn't aware that this was even possible.

Thanks for this demo! I can definitely see cases in some of my layout work that would benefit from having different layouts applied to subgraphs!

Cheers
martin

i tried to make this work for me but something isn't gelling - no idea what it is...any ideas??
I guess nobody can really save you the time from digging a little bit into the demos before pasting them together. Here the problems comes from the fact that the _nodes array is not filled, so you have to make the following changes

Code:
//updateRoot(_nodes[0]);
updateRoot(vis.data.nodes[0]);

In addition you will have to define the GraphDistanceFitler (_gdf variable) according to your needs. And ...

martin
HI martin,
i have said it once and say it again!.
you have wonderfull forum!..great to flare development!
i wanted to ask, im trying to apply this demo to my needs.
i build the nodes now with graphml reader, is there a way to manage the distance between the nodes
it seems that they overlaps
Hi Xperetz,

which nodes are overlapping. Can you post a screenshot? Not sure, of course it has nothing to do with where the graph data comes from ...
So which distance is the one you want to customize?

cheers

martin
Hi martin,
for now i add to the layout a distance filter so always only nodes with depth<2 are visible.
but still you can notice there are 2 nodes overlapping
when i will fininish my demo i will u/l it to the forum!
thank you Smile
avi
Hi Avi,

if you only have depth < 2 and that will stay like that than you shouldn't of course use this mixed layout example, just go for the radial tree layout. For the RadialTreeLayout, it fills the given space if the autoscale parameter is true. (see also http://sourceforge.net/forum/forum.php?t..._id=757572 for that)
Nevertheless you can't ensure that nodes are not overlapping with this layout. In general it is for this layout always better to have nodes with kind of a circular shape, so maybe you can introduce a line break in your text display. You can also think of rotating the rectangular shaped nodes which particular helps to avoid overlapping in top and bottom area of the layout (you would need to use embed fonts for that, otherwise the text display gets crappy)
Rotating or trying to be as circular as possible is what I did so far, hope somebody else can give some more ideas on that.

Cheers

martin
Reference URL's