https://github.com/mdaines/viz.js
Graphviz in your browser
https://github.com/mdaines/viz.js
dot emscripten graphviz javascript
Last synced: 5 months ago
JSON representation
Graphviz in your browser
- Host: GitHub
- URL: https://github.com/mdaines/viz.js
- Owner: mdaines
- License: mit
- Created: 2012-08-24T15:19:20.000Z (over 13 years ago)
- Default Branch: v3
- Last Pushed: 2025-07-21T13:19:03.000Z (5 months ago)
- Last Synced: 2025-07-21T15:23:26.710Z (5 months ago)
- Topics: dot, emscripten, graphviz, javascript
- Language: JavaScript
- Homepage: https://viz-js.com/
- Size: 13.7 MB
- Stars: 4,206
- Watchers: 113
- Forks: 358
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - viz.js - This project is a Makefile for building Graphviz with Emscripten and a simple wrapper for using it in the browser. (Packages / Data Visualization)
- starred-awesome - viz.js - A hack to put Graphviz on the web. (JavaScript)
- awesome-list - viz.js
README
# Viz.js
This is a collection of packages for working with Graphviz in JavaScript. The main package, [viz](./packages/viz), is a WebAssembly build of Graphviz with a simple JavaScript wrapper.
With Viz.js, you can easily render a graph diagram as an SVG element to display it in a webpage:
```js
import * as Viz from "@viz-js/viz";
Viz.instance().then(viz => {
document.body.appendChild(viz.renderSVGElement("digraph { a -> b }"))
});
```
Other packages:
- [lang-dot](./packages/lang-dot) — CodeMirror language support for the Graphviz DOT language.
- [website](./packages/website) — Try out Graphviz and Viz.js. Render a graph visualization in your browser.
## Install
- Viz.js is published on NPM as [`@viz-js/viz`](https://www.npmjs.com/package/@viz-js/viz).
- lang-dot is published on NPM as [`@viz-js/lang-dot`](https://www.npmjs.com/package/@viz-js/lang-dot).
## API
[API Reference](https://viz-js.com/api/)