microsoft / microsoft/automatic-graph-layout

order of sibling nodes

Open
#360 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.5k
Forks
319
Avg merge
38m
Merged PRs (30d)
1

Description

I test WpfApplicationSample with codes below, the first edge will always on the left, and 2nd edge is on the right.
I knew the order of sibling nodes may be changed during layout. but my sample code is so simple.
so how can I keep the edge from left to right with the order in codes?

                Graph graph = new Graph();
                graph.AddEdge("11111", "0");
                graph.AddEdge("11111", "22222222222222222222222222");
                

                graph.Attr.LayerDirection = LayerDirection.TB;

                graphViewer.Graph = graph;

msagl_1
msagl_2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WpfApplicationSample code in the issue, focusing on Graph.AddEdge, Graph.Attr.LayerDirection, and graphViewer.Graph. Run the sample with the two edges in the shown order and inspect how the layout handles sibling nodes. Done means establishing whether the edge order can be preserved from the input and documenting or exposing the appropriate behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.