Microsoft Automatic Graph Layout
Want to improve this question? So it's for Stack Overflow.Closed 4 years ago.I need to draw graphs representing finite state machines. I tried to use. It's cool, but it lacks some things.
There is no documentation, which makes it very difficult to use, I cannot draw loops (edges from a vertex to itself) using its custom WPF control and labeling edges is also not implemented. Is there any other library o adviced way of drawing graphs in WPF?Functionality I need:. edge labeling.
Microsoft Graph Library
loop (cyclic) edges. vertex labeling.
drawing single/double circles around vertices - vertices should be represented either as circle (or double circle) with a label insideAny ideas?EDIT:I got some propositions, for which I am grateful. However, I think I have not made my thought clear. I need this kind of graph:All tools suggested as far are not suitable for this or maybe I don't know how to apply them in this situation. Option 1: Microsoft Automatic Graph LayoutFreeGitHubWinforms WPFIt's WinForms, but it can be imported into WPF with a few lines of code. Visualizing Nodes and Edges with Microsoft Automatic Graph LayoutExamplesFAQOption 2: QuickGraph - A 100% C# graph library with Graphviz SupportFreeThis library is 100% C#.
Don't be misled by the line 'Graphviz Support', this means that it uses C# code to import the output from Graphviz. No C code in sight.Has a NuGet package.Under development from 2003 to 2011 (8 years!!). Option 3: GraphSharpFree. Depends on QuickGraph (which is 100% C#). Supports async/await (nice!).DemoNotesThis one worked really well, was up and running in a couple of hours.

Free Automatic Graph Maker
It also supports DataTemplates, so each node can have any look and feel that you want. Option 4: Graphviz4netFreeOption 5: GoDiagram$$$Option 6: A Graph Tree Drawing Control for WPFFreeNo suitable. It's a tree layout.

Option 7: Using WPF to Visualize a Graph with Circular DependenciesFreeOption 8: GraphVizFreeThis is not C#, and uses non-managed code. Program pemetaan tanah. There are C# wrappers for it, however.Opensourced by AT&T, see 'AT&T Researchers — Inventing the Science Behind the Service', and 'research home portfolio software tools':SourceThey also open sourced Rserve! Option 9: Shields.GraphVizFreeWrapper for GraphViz.Option 10: NetworkView: A WPF custom control for visualizing and editing networks, graphs and flow-chartsFreeThis library allows the user to create connections between nodes, which is probably a bit of an overkill. ExampleIt's all MVVM.
Option 11: Gephi - The Open Graph Viz PlatformFreeSeeNot a WPF graphing library, but provides great examples of how really nice graphs can look. The tutorial is excellent. If this is in a commercial scenario, you should also take a look at.It has all the features you are looking for and its most outstanding feature is the capability to automatically arrange your diagrams. If you have a bigger state machine or even create the state-machine in code, this will help you clearly arrange even large diagrams automatically.
Graph Layout
Also for the labels there are automatic label placement algorithms, which find placements for the labels so that they do not overlap with each other or with other unrelated elements.You can see the library live in action in, but you can also play immediately with the or just evaluate the library and play with the sample sources.Disclaimer: I works for yWorks, but on SO I do not represent my employer.
For WPF has some built-in, to arrange nodes based on their relationships. Currently, we have three standard layouts,. If these layouts are not enough, you can use any other third-party or open-source layout engine for arrangements and you can use diagram’s visualization and other cool features. Has advanced layouts in its layout engine. In this blog, we’ll see how to use this layout engine and visualize a layout using Syncfusion’s diagram control.
Following are some sample graphs rendered using the MSAGL layout engine. RankingLayoutSettings: Layout to arrange graph in a tree structure. It will also rearrange in such a way that it minimizes the sum of edge length and edges crossing over each other. MdsLayoutSettings: Multidimensional scaling layout algorithm. FastIncrementalLayoutSettings: Fast incremental layout is a force-directed layout strategy with approximate computation of long-range node-node repulsive forces to achieve O(n log n) running time per iteration. SugiyamaLayoutSettings: Layout to arrange a tree-like structure.Configure routing technique. Spline: Routing is done using curved segments such as Bezier and Arc segments.
SplineBundling: This is also a spline routing. Additionally, it will group similar connections close to each other. StraightLine: Just a straight line connecting the source to target. SugiyamaSplines: A spline curve more suitable for Sugiyama layout. Rectilinear: Orthogonal or perpendicular segments to connect the nodes. RectilinearToCenter: A rectilinear routing but connecting toward the center of a node.Run MSAGL layout and routing.