Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including ts-graphviz with all npm packages installed. Try it out:

const { attribute: _, digraph, toDot } = require('ts-graphviz'); const G = digraph('G', (g) => { const a = g.node('aa'); const b = g.node('bb'); const c = g.node('cc'); g.edge([a, b, c], { [_.color]: 'red', }); g.subgraph('A', (A) => { const Aa = A.node('Aaa', { [_.color]: 'pink', }); const Ab = A.node('Abb', { [_.color]: 'violet', }); const Ac = A.node('Acc'); A.edge([Aa.port('a'), Ab, Ac, 'E'], { [_.color]: 'red', }); }); }); toDot(G);

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

ts-graphviz v1.8.1

Graphviz library for TypeScript.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free