logo

G6

  • Docs
  • API
  • Playground
  • Community
  • Productsantv logo arrow
  • 5.0.49
  • Introduction
  • Data
  • Getting Started
    • Quick Start
    • Installation
    • Integration
      • react
      • vue
      • angular
    • Step-by-step guide
  • Graph
    • Extensions En
    • Graph
    • Options
    • extension
  • Element
    • Element Overview
    • Element State
    • Node
      • Node Overview
      • Common Node Configuration
      • Circle Node
      • Diamond Node
      • Donut Node
      • Ellipse Node
      • Hexagon Node
      • HTML Node
      • Image Node
      • Rect Node
      • Star Node
      • Triangle Node
      • Custom Node
      • Define Nodes with React
    • Edge
      • Edge Overview
      • Edge Common Configuration
      • Cubic Bezier Curve Edge
      • CubicHorizontal Bezier Curve Edge
      • CubicVertical Bezier Curve Edge
      • Line Edge
      • Polyline Edge
      • Quadratic Bezier Curve Edge
      • Custom Edge
    • Combo
      • Combo Overview
      • Combo Common Options
      • Circle Combo
      • Rect Combo
      • Custom Combo
    • Shape
      • Shape and KeyShape
      • Atomic Shapes and Their Properties
      • Design and Implementation of Composite Shape
  • Layout
    • Layout Overview
    • Common Layout Configuration Options
    • AntvDagre Layout
    • Circular Layout
    • ComboCombined Layout
    • CompactBox Layout
    • Concentric Layout
    • 3D Force-Directed Layout
    • D3 Force-Directed Layout
    • Dagre Layout
    • Dendrogram Layout
    • Fishbone Layout
    • ForceAtlas2 Force-directed Layout
    • Force-directed Layout
    • Fruchterman Force-directed Layout
    • Grid Layout
    • Indented Tree
    • MDS High-dimensional Data Dimensionality Reduction Layout
    • Mindmap Tree
    • Radial Layout
    • Random Layout
    • Snake Layout
    • Custom Layout
  • Behavior
    • Behavior Overview
    • ZoomCanvas
    • AutoAdaptLabel
    • BrushSelect
    • ClickSelect
    • CollapseExpand
    • CreateEdge
    • DragCanvas
    • DragElement
    • DragElementForce
    • FixElementSize
    • FocusElement
    • HoverActivate
    • LassoSelect
    • OptimizeViewportTransform
    • ScrollCanvas
    • Custom Behavior
  • Plugin
    • Plugin Overview
    • Background
    • BubbleSets
    • Contextmenu
    • EdgeBundling
    • EdgeFilterLens
    • Fisheye
    • Fullscreen
    • GridLine
    • History
    • Hull
    • Legend
    • Minimap
    • Snapline
    • Timebar
    • Toolbar
    • Tooltip
    • Watermark
    • Custom Plugin
  • Transform
    • Data Transformation Overview
    • MapNodeSize
    • PlaceRadialLabels
    • ProcessParallelEdges
    • Custom Transform
  • Theme
    • Theme Overview
    • Custom Theme
    • Palette
    • Custom Palette
  • Animation
    • Animation Overview
    • Custom Animation
  • Further Reading
    • Event
    • renderer
    • coordinate
    • download-image
    • Using Iconfont
    • Use 3D
    • Bundle Project
  • What's new
    • Feature
    • Upgrade To 5.0
  • FAQ
  • contribute

Extensions En

Previous
Step-by-step guide
Next
Graph

Resource

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-Interactive solution
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...


title: Built-in Extensions order: 4

The G6 built-in extensions and registered types are as follows:

Animations

ExtensionRegistration Type
ComboCollapse'combo-collapse'
ComboExpand'combo-expand'
NodeCollapse'node-collapse'
NodeExpand'node-expand'
PathIn'path-in'
PathOut'path-out'
Fade'fade'
Translate'translate'

Usage:

In GraphOptions.[node|edge|combo].animation.[stage], for example:

const graph = new Graph({
// ... other options
node: {
animation: {
update: 'translate', // Only use translation animation in the update stage
},
},
});

Behaviors

ExtensionRegistration TypeDescription
BrushSelect'brush-select'/
ClickSelect'click-select'/
CollapseExpand'collapse-expand'/
CreateEdge'create-edge'/
DragCanvas'drag-canvas'/
DragElementForce'drag-element-force'Drag element when use d3-force layout
DragElement'drag-element'/
FixElementSize'fix-element-size'Keep the size of element during zooming canvas
FocusElement'focus-element'/
HoverActivate'hover-activate'/
LassoSelect'lasso-select'/
OptimizeViewportTransform'optimize-viewport-transform'Hide elements during manipulate the canvas
ScrollCanvas'scroll-canvas'/
ZoomCanvas'zoom-canvas'/

Usage:

In GraphOptions.behaviors, for example:

const graph = new Graph({
// ... other options
behaviors: ['drag-canvas', 'zoom-canvas', 'drag-node'],
});

Elements

Nodes

ExtensionRegistration Type
circleCircle
diamondDiamond
ellipseEllipse
hexagonHexagon
htmlHTML
imageImage
rectRect
starStar
donutDonut
triangleTriangle

Usage:

1. In GraphOptions.data.nodes[number].type; 2. In GraphOptions.node.type;

const graph = new Graph({
// ... other options
data: {
nodes: [{ id: 'node-1', type: 'circle' }],
},
node: {
type: 'circle',
},
});

Edges

ExtensionRegistration TypeDescription
Cubic'cubic'Cubic Bezier Curve
Line'line'/
Polyline'polyline'/
Quadratic'quadratic'Quadratic Bezier Curve
CubicHorizontal'cubic-horizontal'Horizontal Cubic Bezier Curve
CubicVertical'cubic-vertical'Vertical Cubic Bezier Curve
CubicRadial'cubic-radial'Radial Cubic Bezier Curve

Usage(like Nodes):

1. In GraphOptions.data.edges[number].type; 2. In GraphOptions.edge.type;

Combos

ExtensionRegistration Type
CircleCombo'circle'
RectCombo'rect'

Usage(like Nodes):

1. In GraphOptions.data.combos[number].type; 2. In GraphOptions.combo.type;

Layouts

ExtensionRegistration TypeDescription
AntVDagreLayout'antv-dagre'/
ComboCombinedLayout'combo-combined'/
CompactBoxLayout'compact-box'/
ForceAtlas2Layout'force-atlas2'/
CircularLayout'circular'/
ConcentricLayout'concentric'/
D3ForceLayout'd3-force'/
DagreLayout'dagre'/
DendrogramLayout'dendrogram'/
ForceLayout'force'/
FruchtermanLayout'fruchterman'/
GridLayout'grid'/
IndentedLayout'indented'/
MDSLayout'mds'Multidimensional Scaling Layout
MindmapLayout'mindmap'/
RadialLayout'radial'/
RandomLayout'random'/

Usage:

In GraphOptions.layout, for example:

const graph = new Graph({
// ... other options
layout: {
type: 'force',
},
});

Palettes

  • spectral
  • tableau
  • oranges
  • greens
  • blues

Usage:

In GraphOptions.[node|edge|combo].palette, for example:

const graph = new Graph({
// ... other options
node: {
palette: 'tableau',
},
});

Themes

Registration Type
dark
light

Usage:

In GraphOptions.theme, for example:

const graph = new Graph({
// ... other options
theme: 'dark',
});

Plugins

ExtensionRegistration Type
BubbleSets'bubble-sets'
EdgeFilterLens'edge-filter-lens'
GridLine'grid-line'
Background'background'
Contextmenu'contextmenu'
Fisheye'fisheye'
Fullscreen'fullscreen'
History'history'
Hull'hull'
Legend'legend'
Minimap'minimap'
Snapline'snapline'
Timebar'timebar'
Toolbar'toolbar'
Tooltip'tooltip'
Watermark'watermark'

Usage:

In GraphOptions.plugins, for example:

const graph = new Graph({
// ... other options
plugins: ['minimap', 'contextmenu'],
});

Transforms

ExtensionRegistration TypeDescription
ProcessParallelEdges'process-parallel-edges'/
PlaceRadialLabels'place-radial-labels'径向标签

Usage:

In GraphOptions.transform, for example:

const graph = new Graph({
// ... other options
transform: ['process-parallel-edges', 'place-radial-labels'],
});

Shapes

Registration Type
circle
ellipse
group
html
image
line
path
polygon
polyline
rect
text
label
badge

Usage:

In the upsert method of the element class when customizing the shape, pass the second parameter:

this.upsert('shape-key', 'text', { text: 'label', fontSize: 16 }, this);