Skip to main content

Diagram

HTML Tag
vjs-diagram

Provides an SVG diagram component. This is a wrapper around a Surface or Paper, with a few flags set:

  • We use an SVG container element
  • Every cell is drawn as an SVG element from a ShapeLibrary
  • Cell sizes and positions are stored inside the model

A Diagram is a pure SVG UI.

Usage​

Definition​

Inputs​

NameTypeDescription
dataInputSignal<Record<string,any>>Optional data to load after the view has been initialised. This input is a signal, and will reload the dataset if changed.
modelOptions?ModelOptionsOptions for the underlying model
options?DiagramOptionsOptions for the Diagram
urlInputSignal<string>Optional url from which to load data after the view has been initialised. This input is a signal, and will reload the dataset if changed.

Class Members​

NameTypeDescription
diagramDiagramThe underlying Diagram.