Node accessors control the way how users want to render nodes. Layers provide the flexibility that users can add several visual layers to represent a node, such as adding circles, icons, and text labels.
Example of nodeStyle:
<GraphGL
{...shareProps}
nodeStyle={[
{
type: NODE_TYPE.CIRCLE,
radius: 10,
color: '#f00'
},
]}
/>
Type
can only beCIRCLE
,MARKER
,RECTANGLE
, orLABEL
.- Different type of layer may requires different properties. See more details in the 'Node style' chapter below.
- Default:
null
- The offset distance from the position of the object.
- Default:
true
- If
scaleWithZoom
is true, the size of the element will be scaled according to the zoom level.