microsoft / microsoft/automatic-graph-layout
AutomaticGraphLayoutControl : Different layout each time
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 319
- Avg merge
- 38m
- Merged PRs (30d)
- 1
Description
The following code creates a slightly different layout each time it is run. I would expect the same code to always have the exact same layout?
public partial class MainWindow : Window
{
public MainWindow()
{
var graph = new Graph();
graph.AddNode("A");
graph.AddNode("B");
graph.AddNode("C");
graph.AddNode("D");
graph.AddNode("E");
graph.AddNode("F");
graph.AddNode("G");
graph.AddNode("H");
graph.AddNode("I");
graph.AddNode("J");
graph.AddNode("K");
graph.AddNode("L");
graph.AddNode("M");
graph.AddEdge("B", "E");
graph.AddEdge("C", "E");
graph.AddEdge("C", "F");
graph.AddEdge("D", "F");
graph.AddEdge("B", "G");
graph.AddEdge("D", "G");
graph.AddEdge("E", "H");
graph.AddEdge("F", "H");
graph.AddEdge("F", "I");
graph.AddEdge("G", "I");
graph.AddEdge("I", "J");
graph.AddEdge("A", "J");
graph.AddEdge("J", "K");
graph.AddEdge("B", "K");
graph.AddEdge("K", "M");
graph.AddEdge("L", "M");
InitializeComponent();
layoutControl.Graph = graph;
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied MainWindow reproduction and the AutomaticGraphLayoutControl that receives its graph. Run the example repeatedly and trace where layout positions are assigned or randomized. Done means the same graph produces the same layout on repeated runs, with a regression test if the project has a suitable test entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100