Skip to content

coder-xiaotian/graphviz-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphvizWorker

A web worker version of the @hpcc-js/wasm library.

USAGE

npm install graphviz-worker

import Graphviz from "graphviz-worker";

const graphviz = new Graphviz();
const dotSource = "digraph G { Hello -> World }";
const jsonStr = await graphviz.layout(dotSource)

API

layout

layout(dotSource, outputFormat?, layoutEngine?, options?): string

Parameters

Name Type Default value Description
dotSource string undefined Required - graph definition in DOT language
outputFormat Format "json" The format of the result.
layoutEngine Engine "dot" The type of layout to perform.
options? Options undefined Advanced Options for images, files, yInvert and nop.

destroy

destroy(): void

Destroy the web worker.

Types

Format

Format: "svg" | "dot" | "json" | "dot_json" | "xdot_json" | "plain" | "plain-ext"

Various graphic and data formats for end user, web, documents and other applications. See Output Formats for more information.

Engine

Engine: "circo" | "dot" | "fdp" | "sfdp" | "neato" | "osage" | "patchwork" | "twopi"

Various algorithms for projecting abstract graphs into a space for visualization. See Layout Engines for more details.

About

A version of graphviz used for web worker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published