Skip to main content

Usage

caution

In future it will also be possible to generate an SVG image from a specification at the commandline using a stand-alone tool.

Using the editor

The quickest way to get started using NetPanorama is the interactive online editor. This allows you to view the results of applying a visualization specification to a dataset and save the results.

Embedding the viewer

You can also embed the NetPanorama viewer on your own website.

Limitation

The NetPanorama package is not yet published to npm, so it cannot yet be installed with npm install; it will be soon.


// Import the module
import { GraphgraView } from "netpanorama";

// Provide a specification (as a JOSN object, rather a string), and an object of options
// This must include the id of the div in which the visualization should be rendered.
const viewer = new GraphgraView(spec, {container: "#SVG"})

// Actually render the specification
await viewer.render();

// Optionally add the viewer object to the window, so that it can be conveniently access from Developer Tools for debugging.
// The state can be accessed as viewer.state
window.viewer = viewer;