shusenl / viz.js

A hack to put Graphviz on the web.

Home Page:http://mdaines.github.io/viz.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Viz.js

This project is a Makefile for building Graphviz with Emscripten and a simple wrapper for using it in the browser.

Getting Viz.js

Download the viz.js "binary" from the releases page.

API

There is one function, Viz.

Viz(src, options={ format="svg", engine="dot" })

Some examples:

Viz("digraph g { a -> b; }");
Viz("graph G { n0 -- n1 -- n2 -- n3 -- n0; }", { engine: "neato" });
Viz("digraph g { x -> y -> z; }", { format: "plain" });

These engines are supported:

  • dot
  • neato
  • circo
  • twopi
  • fdp

These formats are supported:

  • svg
  • xdot
  • plain
  • ps

Build

To build from source, you will need to install the Emscripten SDK: http://kripken.github.io/emscripten-site/docs/getting_started/index.html

To download the sources and build everything:

make

License

Viz.js itself (the Makefile and the contents of src/) is BSD licensed.

About

A hack to put Graphviz on the web.

http://mdaines.github.io/viz.js

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Makefile 49.4%Language:C 27.8%Language:JavaScript 16.2%Language:HTML 6.6%