This project is read-only.

Graph layout engine for silverlight

Summary

The goal of this project is to provide small simple library to edit and visualize directed graphs.
All ideas came from a greate tool GraphViz.
I always wanted to have native C# implementation of souch tool, but there are no open source tools as cool as GraphViz.

News

08.11.2010
  1. V 0.2 Alpha released.
  2. Demo application updated. Now it supports manual edge routing.
13.10.2010 Demo application updated. Now it supports some Drag&Drop operations.
19.07.2010 Changed license from GPL v2 to MS-PL.
17.06.2010 V 0.1 Alpha released.

Example

Click here to navigate to silverlight demo

Click on image to go to online silverlight demo.

Implementation Details

Original algorithms are described here. The main concept is that there are four steps in directed graph layout algorithm:
  1. Node rank assignment
  2. Node ordering within ranks
  3. Setting node sizes and coordinates
  4. Make splines to draw edges

My interpretation

First two steps are pure mathematical problems and can be done without any graphics. The third step can be made almost automatically by SilverLight (WPF) engine. And the fourth step shoud be executed "on demand" when initial graph displays and when you drag&drop any node. Morover when you drag&drop node only edges linked to this node should be redrawn. Steps 3 and 4 can be done using data bindings and MVVM pattern. Actually Graph is ViewModel in my implementation.

Roadmap

V 0.2 Alpha

  1. Drag&Drop existing nodes
  2. Manually route edges
    1. Moving existing control points
    2. Removing existing control points
    3. Adding new control points
  3. Custom edge colors and thickness

V 0.3 Alpha

  1. More node shapes
  2. Tooltips for each node and edge
  3. Graph designer (with Drag&Drop support)
    1. Shapes and arrows toolbox
    2. Add nodes and arrows from toolbox to design surface
    3. Connect nodes
    4. Edit edge and node properties

Bibliography

Last edited Feb 18, 2011 at 8:36 AM by bog1978, version 23