This project is read-only.
Project Description
Dot2Silverlight is a project thats enables to render graphs (written in Dot format) in Silverlight.
dot2silverlight, dot, silverlight, C#, graphviz, xdot, plain, layout graphs, shortest path

Dot2Silveright is a Silverlight control for viewing graphs rendered by dot/GraphViz --- The current viewer control has the usual navigation -- i.e. zoom, scroll -- and supports hit testing on nodes, which can be used for different purposes.

In this first version, the control displays all the nodes as rectangles.
In the future, I will provide the different shapes and arrows supported by Graphviz.
Also, it is possible to display labels on edges as is allowed by Dot.

I decided to develop this Dot to Silverlight Converter because I am building a tool for Program Verification and Slicing
( environment, and I need to display the Control Flow Graph (CFG) for the program under analysis.
The graph should be dislpayed on the web in an interactive mode, not just as a static image.
So, the idea of using, in the context, Silverlight to display/animate a Dot graph came up.

Please try it and leave your comments.
You can play with a demo at
Keep in touch for future versions.

The architecture of the current version is depicted in the figure below.

Dot2Silveright accepts as input a file in DOT format, a format which contains only the information about the nodes and edges of a graph and calls a WebService to activate Graphviz dot; dot reads the DOT file, generates the graph layout and export to xDot format (a format which also contains
information about node and edge positions). Then a parser (built using AnTLR) processes the plain format file and generates C# code to create a data structure (an internal representation of the graph) that stores the information about nodes, edges and the position of all graphical elements.
Silveright is then able to read that data structure, show it and even animate it.


Screenshot of the application:


Last edited May 9, 2010 at 11:09 PM by danieladacruz, version 13