Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aduh95/viz.js

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aduh95/viz.js

A hack to put Graphviz on the web.

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
378K
decreased by-0.33%
Maintainers
1
Weekly downloads
 
Created

What is @aduh95/viz.js?

@aduh95/viz.js is a JavaScript wrapper for Graphviz, a popular open-source graph visualization software. It allows you to create, manipulate, and render graphs using the DOT language directly in JavaScript environments, including Node.js and browsers.

What are @aduh95/viz.js's main functionalities?

Render DOT to SVG

This feature allows you to render a DOT string into an SVG element. The code sample demonstrates how to create a simple directed graph from node 'a' to node 'b' and append the resulting SVG to the document body.

const viz = new Viz();
viz.renderSVGElement('digraph { a -> b; }')
  .then(function(element) {
    document.body.appendChild(element);
  });

Render DOT to PNG

This feature allows you to render a DOT string into a PNG image element. The code sample shows how to create a simple directed graph and append the resulting PNG image to the document body.

const viz = new Viz();
viz.renderImageElement('digraph { a -> b; }')
  .then(function(element) {
    document.body.appendChild(element);
  });

Render DOT to plain text

This feature allows you to render a DOT string into plain text. The code sample demonstrates how to create a simple directed graph and log the resulting plain text representation to the console.

const viz = new Viz();
viz.renderString('digraph { a -> b; }')
  .then(function(result) {
    console.log(result);
  });

Other packages similar to @aduh95/viz.js

Keywords

FAQs

Package last updated on 09 Jun 2020

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