Skip to content
Render dot Graphs into SVGs in the browser
C JavaScript Makefile HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
browser
configs
graphs
.gitignore
LICENSE
Makefile
README.md
dot-wasm-native.c
dot-wasm.c
index.js
package.json
test-node.js
yarn.lock

README.md

dot-wasm

Demo

Render .dot Graphs into SVGs right in your browser (or in node without any native module).

Usage

The package exports a promise that resolves to a dotToSVG function. This is necessary because this function can only be called after the WASM module was loaded.

const render = require("dot-wasm");

render.then(function(dotToSVG) {
	try {
		const svg = dotToSVG(document.querySelector("textarea").value);
	} catch(e){
		console.error(e);
	}
	// ...
});

For examples, see this node example or this more complete browser example, which is also hosted as a demo at https://dot-wasm.now.sh/


For the most part this is a reduced version fo the unmaintained https://github.com/mdaines/viz.js .

You can’t perform that action at this time.