logo

G6

  • Docs
  • API
  • Playground
  • Community
  • Productsantv logo arrow
  • 5.0.48
  • 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
      • Build-in Node
        • Common Node Configurations
        • Diamond
        • Donut
        • Ellipse
        • Hexagon
        • Html
        • Image
        • Rect
        • Star
        • Triangle
        • Circle
      • Custom Node
      • Define Nodes with React
    • Edge
      • Edge Overview
      • Build-in Edge
        • Common Edge Configurations
        • Cubic Bezier Curve
        • CubicHorizontal Bezier Curve
        • CubicVertical Bezier Curve
        • Line
        • Polyline
        • Quadratic Bezier Curve
      • Custom Edge
    • Combo
      • Combo Overview
      • Build-in Combo
        • Circle
        • Combo Configuration Options
        • Rect
      • Custom Combo
    • Shape
      • Shape and KeyShape
      • Atomic Shapes and Their Properties
      • Design and Implementation of Composite Shape
  • Layout
    • Layout Overview
    • Build-in Layout
      • 3D Force-Directed Layout
      • AntvDagre Layout
      • Circular Layout
      • ComboCombined Layout
      • Common Layout Configuration Options
      • CompactBox
      • Concentric Layout
      • D3 Force-Directed Layout
      • Dagre Layout
      • Dendrogram Layout
      • Fishbone Layout
      • Force Force-directed Layout
      • ForceAtlas2 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
    • Build-in Behavior
      • AutoAdaptLabel
      • BrushSelect
      • ClickSelect
      • CollapseExpand
      • CreateEdge
      • DragCanvas
      • DragElement
      • DragElementForce
      • FixElementSize
      • FocusElement
      • HoverActivate
      • LassoSelect
      • OptimizeViewportTransform
      • ScrollCanvas
      • ZoomCanvas
    • Custom Behavior
  • Plugin
    • Plugin Overview
    • Build-in Plugin
      • Background
      • BubbleSets
      • Contextmenu
      • EdgeBundling
      • EdgeFilterLens
      • Fisheye
      • Fullscreen
      • GridLine
      • History
      • Hull
      • Legend
      • Minimap
      • Snapline
      • Timebar
      • Toolbar
      • Tooltip
      • Watermark
    • Custom Plugin
  • Transform
    • Data Transformation Overview
    • Build-in Transform
      • 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

ComboCombined Layout

Previous
Circular Layout
Next
Common Layout Configuration Options

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...

Overview

ComboCombined composite layout is suitable for graph data with composite group structures. It supports flexible configuration of the layout for elements inside combos as well as the layout between the outermost combos and nodes. By default, the internal elements use the Concentric layout, and the outer layout uses the gForce force-directed layout, balancing layout effect and overall stability. See more ComboCombined layout examples and source code.

Usage Scenarios

  • User profile analysis: Analyze user behavior and product relationships, use user interest circles as combos, display specific products and behavior tags as internal nodes, and help operators identify user consumption paths.
  • Supply chain management graph: Divide suppliers, manufacturers, warehouses, and distributors into combos by role or region, display resources, personnel, or equipment as internal nodes, and clearly show the internal structure of each link in the supply chain.

Options

PropertyDescriptionTypeDefaultRequired
typeLayout typecombo-combined-✓
centerLayout centerPointTupleGraph center
comboPaddingPadding value inside the combo, used only for force calculation, not for rendering. It is recommended to set the same value as the visual padding.((d?: unknown) => number) | number | number[] | undefined10
innerLayoutLayout algorithm for elements inside the combo, see belowLayoutConcentricLayout
nodeSizeNode size (diameter), used for collision detection. If not specified, it is calculated from the node's size property, or defaults to 10.number | number[] | (d?: NodeData) => number10
outerLayoutLayout algorithm for the outermost layer, see belowLayoutForceLayout
spacingMinimum spacing between node/combo edges when preventNodeOverlap or preventOverlap is true. Can be a callback for different nodes.number | (d?: NodeData) => number-
treeKeytreeKeystring-

innerLayout

Layout<any> Default: ConcentricLayout

The layout algorithm for elements inside the combo. Must use a synchronous layout algorithm. Default is ConcentricLayout. More layouts

Example:

import { ConcentricLayout } from '@antv/layout';
new Graph({
layout: {
type: 'combo-combined',
/**
* See more ConcentricLayout options:
* https://github.com/antvis/layout/blob/v5/packages/layout/src/types.ts#L397
*/
innerLayout: new ConcentricLayout({
sortBy: 'id',
nodeSize: 20,
clockwise: true,
}),
},
});

outerLayout

Layout<any> Default: ForceLayout

The layout algorithm for the outermost layer. Default is ForceLayout. More layouts

Example

import { ForceLayout } from '@antv/layout';
new Graph({
layout: {
type: 'combo-combined',
/**
* See more ForceLayout options:
* https://github.com/antvis/layout/blob/v5/packages/layout/src/types.ts#L950
*/
outerLayout: new ForceLayout({
gravity: 1,
factor: 2,
linkDistance: (edge: any, source: any, target: any) => {
const nodeSize = ((source.size?.[0] || 30) + (target.size?.[0] || 30)) / 2;
return Math.min(nodeSize * 1.5, 70);
},
}),
},
});

Example Code