Skip to content

Question for non-standard force layout model #156

@NicolasWinsten

Description

@NicolasWinsten

Hello

I am trying to make a force layout simulation that displays the graph in a tree like way. By "tree-like", I mean I want the resulting layout to look something like a hierarchical layout where parent nodes will be displayed above child nodes, left child nodes are placed to the left of their sibling nodes, etc. These aren't hard constraints, but I want the layout to trend towards local placements close to this:

          parent
        /        \
leftChild    rightChild

I don't want to use Sugiyama because it is complicated to turn that into an incremental algorithm (nodes in my visualization will be continually added and removed).

My main idea right now is to coarsen the graph by treating some of the local 3-node subgraphs (parent, leftChild, rightChild) as single nodes, and applying a force simulation on that simplified graph. Maybe even treating 2-node subgraphs of (parent, leftChild) as single nodes would be enough.

Is there a more elegant/simple approach?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions