https://github.com/mdaines/viz-js
Graphviz in your browser
https://github.com/mdaines/viz-js
dot emscripten graphviz javascript
Last synced: 18 days 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 (about 14 years ago)
- Default Branch: v3
- Last Pushed: 2026-09-28T14:20:07.000Z (about 1 month ago)
- Last Synced: 2026-10-16T15:21:21.036Z (20 days ago)
- Topics: dot, emscripten, graphviz, javascript
- Language: JavaScript
- Homepage: https://viz-js.com/
- Size: 14.1 MB
- Stars: 4,353
- Watchers: 106
- Forks: 368
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - mdaines/viz-js - Graphviz in your browser (javascript)
- awesome-technostructure - mdaines/viz-js - js: Graphviz in your brows ([🪄 ui-front-end](https://github.com/stars/ketsapiwiq/lists/magic-wand-ui-front-end))
- awesome-javascript - mdaines/viz-js - Graphviz in your browser (Graphics and Media / Graphics and Rendering)
README
# Viz.js
This is a collection of packages for working with Graphviz in JavaScript.
To render a graph as an SVG string:
```js
import { dot2svg } from "@viz-js/dot2svg";
const svg = await dot2svg("digraph { a -> b }");
```
Packages:
- [viz](./packages/viz) — WebAssembly build of Graphviz and JavaScript wrapper.
- [dot2svg](./packages/dot2svg) — Simplified interface for the `viz` package.
- [lang-dot](./packages/lang-dot) — CodeMirror language support for the Graphviz DOT language.
## Install
- viz is published on NPM as [`@viz-js/viz`](https://www.npmjs.com/package/@viz-js/viz).
- dot2svg is published on NPM as [`@viz-js/dot2svg`](https://www.npmjs.com/package/@viz-js/dot2svg).
- 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/)