Socket
Socket
Sign inDemoInstall

viz.js

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viz.js

A hack to put Graphviz on the web.


Version published
Weekly downloads
65K
increased by5.81%
Maintainers
2
Weekly downloads
 
Created
Source

Viz.js

This is the release build of Viz.js, which is a Makefile for building Graphviz with Emscripten and a simple wrapper for using it in the browser.

Getting Viz.js

Install with Bower:

bower install viz.js

Or with npm:

npm install viz.js

Or download the viz.js "binary" from the releases page.

API

There is one function, Viz, which returns output as a string.

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

Some examples:

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

If src has a syntax error, Graphviz's error message will be thrown as an exception.

These engines are supported:

  • circo
  • dot
  • fdp
  • neato
  • osage
  • twopi

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 wrapper and Makefile, not the compiled versions of Graphviz, Expat, zlib, etc.) is BSD licensed.

Keywords

FAQs

Package last updated on 28 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc