Microsoft Automatic Graph Layout FAQ

This document a compilation of the most frequently asked questions asked while Microsoft Automatic Graph Layout was being developed.

Keep abreast of the latest information about Microsoft Automatic Graph Layout by joining the MSAGL Community.


What is Microsoft Automatic Graph Layout and what does it do?

Microsoft Automatic Graph Layout (MSAGL) is a .NET tool for laying out and visualizing directed graphs. You can use MSAGL to represent complex directed graphs, such as those found in business management, manufacturing, and network analysis, as well as phylogenetic trees, which are used in bioinformatics research.

MSAGL includes three integrated components: an automatic layout engine that simplifies creating aesthetically pleasing graphs with thousands of nodes that are easy to understand; a drawing layer that enables you to modify the attributes of the graphical components, such as the color of nodes and the style of edges; and a Windows-based viewer that uses the engine and drawing layer to create interactive graphs. With the viewer, you can edit graphs by dragging nodes around and modifying edge curves, capture mouse events such as hover, click to get properties of nodes and edges, zoom in and pan out to interact with graphs of all size, and more. Creating a complex graph typically takes just three steps: create the graph object, set the nodes and edges, and then bind the graph object with the viewer. MSAGL includes C# samples that help you draw your first graphs in minutes. To learn more about MSAGL, visit

What is the maximal size of a graph that MSAGL can handle?

Theoretically, there is no limit. In practice, it is limited by the amount of RAM and CPU processor available on a computer. For example, a graph with 15,000 edges takes about 10 minutes to lay out on a 4 GB RAM 2.2 GHz Intel® Core™ Duo processor computer. In general, the memory requirement and the time to calculate the layout increase as the square of the number of graph edges increases.

I need to render a graph on a Web page. Can MSAGL help here?

Sure. Class Microsoft.Msagl.GraphViewerGDI.GraphRenderer serves this purpose. It can render a graph using just a Graphics object. Create a Graphics object and pass it to Render method.



Can you edit a layout using the viewer?

Yes, check out the sample file “LayoutEditingSample” to see how this works.

Can I associate my data with a node or an edge of the graph?

Yes, use the UserData field of a node or edge.

Can I specify a custom brush for a node drawing?

This feature is not supported yet.

Can MSAGL open .dot files?

No, MSAGL does not support loading DOT files.

More Info

Where can I read a description of how MSAGL works?

There is a technical report explaining the theory behind the tool at


Pricing and Ordering


Installation and Compatibility

Microsoft está realizando una encuesta en línea para comprender su opinión del sitio web de. Si decide participar, se le presentará la encuesta en línea cuando abandone el sitio web de.

¿Desea participar?