1.1.0 • Published 4 months ago

graphviz-worker v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

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

NameTypeDefault valueDescription
dotSourcestringundefinedRequired - graph definition in DOT language
outputFormatFormat"json"The format of the result.
layoutEngineEngine"dot"The type of layout to perform.
options?OptionsundefinedAdvanced 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.

1.1.0

4 months ago

1.0.2

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago