graphviz.dart

A Dart package and Emscripten module for Graphviz.

Usage

To render as SVG (produces an XML string):

var svg = graphviz("digraph { a -> b; }", render: Render.SVG);

Asynchronous API

To prevent UI freeze graph layout may be computed in a separate thread using Web Workers:

var gv = new Graphviz();
gv.layout("digraph { a -> b; }").then((String result) {
  print(result);
});

Examples

Try comparing page load and refresh times between Firefox and other browsers.

Development

Set the current Emscripten path:

cd /path/to/emsdk_portable/
source ./emsdk_env.sh

Build the Graphviz Emscripten module:

emmake make clean all

Credits

This project is based on work by Mike Daines, Satoshi Ueyama and Brenton Partridge:

Thanks to the following contributors:

jbogard KylePDavis siefkenj srathbun vmarkovtsev

Libraries

graphviz
graphviz.graphs