---
title: EdgeDisplayModel
order: 8
---
EdgeDisplayModel is the rendering data of Edge, which is obtained by [EdgeModel](./EdgeModel.en.md) through [data mapping](./DataIntro.en.md#mappers). 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](../graph/Specification.en.md#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](/en/apis/shape/line-style-props); the key shape of `'cubic-edge'` is `'path'`, please refer to [PathStyleProps](/en/apis/shape/path-style-props).
:::info
The following attributes are inherited from [EdgeModel](./EdgeModel.en.md)
:::