logo

Ant Design Charts

  • Manual
  • Options
  • Examples
  • Productsantv logo arrow
  • 2.0.0
  • Component Overview
  • Common Configuration Statistical Charts
    • Chart composition
    • Component
      • 标题(Title)
      • Axis
      • Legend
      • Scrollbar
      • Slider
      • Tooltip
      • Label
    • Core
      • Color En
      • View
      • Data
        • overview
        • custom
        • ema
        • fetch
        • filter
        • fold
        • inline
        • join
        • kde
        • log
        • map
        • pick
        • rename
        • slice
        • sort
        • sortBy
      • Scale
        • overview
        • band
        • linear
        • log
        • ordinal
        • point
        • pow
        • quantile
        • quantize
        • sqrt
        • threshold
        • time
      • Transform
        • overview
        • bin
        • binX
        • diffY
        • dodgeX
        • flexX
        • group
        • groupColor
        • groupX
        • groupY
        • jitter
        • jitterX
        • jitterY
        • normalizeY
        • pack
        • sample
        • select
        • selectX
        • selectX
        • sortColor
        • sortX
        • sortY
        • stackEnter
        • stackY
        • symmetryY
      • Coordinate
        • overview
        • fisheye
        • parallel
        • polar
        • radial
        • theta
        • transpose
        • cartesian3D
      • 样式(Style)
      • Animate
        • overview
        • fadeIn
        • fadeOut
        • growInX
        • growInY
        • morphing
        • pathIn
        • scaleInX
        • scaleInY
        • scaleOutX
        • scaleOutY
        • waveIn
        • zoomIn
        • zoomOut
      • 状态(State)
      • Interaction
        • Overview
        • brushAxisHighlight
        • brushHighlight
        • brushXHighlight
        • brushYHighlight
        • brushFilter
        • brushXFilter
        • brushYFilter
        • chartIndex
        • elementHighlight
        • elementHighlightByColor
        • elementHighlightByX
        • elementSelect
        • elementSelectByColor
        • elementSelectByX
        • fisheye
        • legendFilter
        • legendHighlight
        • poptip
        • scrollbarFilter
        • sliderFilter
      • Composition
        • overview
        • facetCircle
        • facetRect
        • repeatMatrix
        • spaceFlex
        • spaceLayer
        • timingKeyframe
      • Theme
        • overview
        • Academy
        • classic
        • classicDark
      • event
    • Specal Plot
      • Area
      • Bar
      • CirclePacking
      • DualAxes
      • Gauge
      • Line
      • Rose
      • Sankey
      • Scatter
      • Sunburst
      • Treemap
      • Venn
      • WordCloud
      • Column
      • Pie
      • BidirectionalBar
      • Box
      • Bullet
      • Funnel
      • Heatmap
      • Histogram
      • Liquid
      • Radar
      • Stock
      • Tiny
      • Violin
      • Waterfall
      • RadialBar
  • Relation Graph Components
    • Overview
    • MindMap
    • Fishbone
    • IndentedTree
    • Dendrogram
    • OrganizationChart
    • FlowGraph
    • FlowDirectionGraph
    • NetworkGraph
    • FAQ

FlowGraph

Previous
OrganizationChart
Next
FlowDirectionGraph

Resources

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-互动图形解决方案
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

Used to visually represent the steps and decision points of a process or system.

import { FlowGraph } from '@ant-design/graphs';

When to Use

A flowchart shows the entire process from start to finish. Each node represents a specific step or decision point, and the edges indicate the sequence and relationships between steps.

  • Suitable for scenarios that require displaying linear processes or steps.
  • Useful for planning and tracking project progress, clarifying task order and dependencies.
  • Ideal for building decision trees, showing different decision points and paths.

Examples

API

For general graph properties, refer to: General Graph Properties

FlowGraph

PropertyDescriptionTypeDefault Value
dataThe datasetData-
labelFieldSpecifies the node label content
- Select a field from the data, and the corresponding field value will be used as the node label
- Dynamically generated: this function will be called with node data as a parameter, and its return value will be used as the node label
string | ((node: NodeData) => string)Node ID
layoutDagre layout configurationLayout-

Data

Graph data. If the expand-collapse behavior is enabled, make sure the children field is included in the data.

const graphData = {
nodes: [
{ id: '1', data: { label: 'Node 1' }, children: ['2', '3'] },
{ id: '2', data: { label: 'Node 2' }, children: ['4'] },
{ id: '3', data: { label: 'Node 3' } },
{ id: '4', data: { label: 'Node 4' } },
],
edges: [
{ source: '1', target: '2' },
{ source: '1', target: '3' },
{ source: '2', target: '4' },
],
};

Layout

Dagre Hierarchical Layout. The configuration options are as follows:

For more details, refer to the Dagre Wiki.

PropertyDescriptionTypeDefault Value
rankdirThe direction of node arrangement. Options include TB, BT, LR, or RL, where T = Top, B = Bottom, L = Left, and R = Right.stringTB
alignNode alignment mode. Options include UL, UR, DL, or DR, where U = Up, D = Down, L = Left, and R = Right.stringundefined
nodesepThe horizontal spacing between nodes in the layout, in pixels.number50
edgesepThe horizontal spacing between edges in the layout, in pixels.number10
ranksepThe spacing between levels in the layout, in pixels.number50
marginxThe margin on the left and right sides of the graph, in pixels.number0
marginyThe margin on the top and bottom sides of the graph, in pixels.number0
acyclicerIf set to greedy, uses a greedy heuristic algorithm to find the feedback arc set of the graph. The feedback arc set consists of edges that can be removed to make the graph acyclic.stringundefined
rankerThe algorithm used to assign ranks to nodes in the input graph. Possible values are network-simplex, tight-tree, or longest-path.stringnetwork-simplex
Basic Usage

A simple demonstration.

Highlight Elements and Their Chains

By adding hover-highlight interaction (registered as hover-activate-chain), elements and their associated chains are highlighted on hover.

Custom Nodes

Customize nodes using node.component, which needs to be paired with node.size to work properly.