Item Model Properties

2 min read

In a graph of G6, there are Node, Edge, and Combo items. Each item is an instance with a data model which defines the styles and configurations of the item. The Tutorial-Configure the Items introduces two ways to configure the items: Configure the items globally when instantiating the Graph; Configure the items in the source data. No matter which way to configure the items, it is configuring the data model for each item. This document introduces the configurations of the models of Node, Edge, and Combo.


String required

The ID of the item, MUST be unique and string


Object optional

The style of the item's keyShape. Its properites are related to the type of the keyShape. Refer to Shape Style Properties


String optional

The type name of the item. 'line' is the default value for Edge, 'circle' for Node, and 'circle' for Combo


String optional

The text of the item's label. The text will be rendered if the label property exist


Object optional

The configurations for the label. It is different for Node, Combo, and Edge. Check out the following content for more detail