Node Model Properties

2 min read

Except for the common properties, apart from the Item Model Properities, there are special configurations for Nodes. The styles of them depend on their keyShape.

Common Property


String required

The ID of the node, MUST be a unique string.


Number optional

x coordinate.


Number optional

y coordinate.


String optional default:: 'circle'

The shape type of the node. It can be the type of built-in Node, or the custom Node. 'circle' by default.


Number | Array optional default:: 20

The size of the node.


Array optional

The interactions of the node and related edges. It can be null. [0, 0] represents the anchor on the left top; [1, 1] represents the anchor ont he right bottom.


Object optional

The node style. style is an object to configure the filling color, stroke color, shadow, and so on. Please refer to: Shape Properties


String optional

The label text of the node.


positionfalseStringThe relative positions to the node. Options: 'center', 'top', 'left', 'right', 'bottom'. 'center' by default.
offsetfalseNumberThe offset value of the label. When the position is 'bottom', the value is the top offset of the node; When the position is 'left', the value is the right offset of the node; it is similar with other position.
stylefalseObjectThe style property of the label. The complete configurations for the label style is listed in Shape Style Properties - Text

Properties for Specific Built-in Nodes

The special properties for each built-in Nodes can be found in the subdocuments of Built-in Nodes.