g6/packages/site/docs/apis/data/EdgeDisplayModel.en.md
Aaron 3534d4669b
docs: adjust docs of data (#5211)
* docs: adjust docs of data

* docs: update api docs
2023-12-01 17:44:49 +08:00

2.1 KiB

title order
EdgeDisplayModel 8

EdgeDisplayModel is the rendering data of Edge, which is obtained by EdgeModel through data mapping. EdgeDisplayModel can only be accessed by G6.

source Required

Type: string | number

The ID of the source node of the edge. It should correspond to an item in nodes, otherwise the edge data will not be added to the graph.

target Required

Type: string | number

The ID of the target node of the edge. It should correspond to an item in nodes, otherwise the edge data will not be added to the graph.

data Required

The data in EdgeDisplayModelData is the result of the EdgeModel being mapped through the mapper (specification.edge) configured on the Graph instance. It should store all the contents of the EdgeModel, as well as many shape style configurations.

keyShape

The style configuration of the key shape of the edge. The key shape of the edge is the overall path shape of the edge.

Type: ShapeStyle, the shape style configuration of the key shape depends on the different main shapes. For example, the key shape of 'line-edge' is 'line', please refer to LineStyleProps; the key shape of 'cubic-edge' is 'path', please refer to PathStyleProps.

:::info The following attributes are inherited from EdgeModel :::