diff --git a/src/core/components/SkGraph/layout.ts b/src/core/components/SkGraph/layout.ts index 099860300..23d3bfc30 100644 --- a/src/core/components/SkGraph/layout.ts +++ b/src/core/components/SkGraph/layout.ts @@ -1,4 +1,4 @@ -import { ForceLayoutOptions, LayoutOptions } from '@antv/g6'; +import { ComboCombinedLayoutOptions, ForceLayoutOptions, LayoutOptions } from '@antv/g6'; import { theme } from './config'; import { GraphLayouts } from '../../../types/Graph.interfaces'; @@ -12,18 +12,20 @@ const LAYOUT_TOPOLOGY_DEFAULT: ForceLayoutOptions & { type: 'force' } = { factor: 4 }; -const LAYOUT_TOPOLOGY_COMBO: ForceLayoutOptions & { type: 'force' } = { - type: 'force', - nodeSize: theme.node.size, +const LAYOUT_TOPOLOGY_COMBO: ComboCombinedLayoutOptions & { type: 'combo-combined' } = { + type: 'combo-combined', + nodeSize: theme.node.size / 2, nodeSpacing: theme.node.size, - preventOverlap: true, - clustering: true, - nodeClusterBy: 'cluster', - distanceThresholdMode: 'max', - clusterNodeStrength: 300000, - nodeStrength: 8000, - leafCluster: true, - factor: 1000 + comboPadding: 0, + comboSpacing: 0, + layout: { + type: 'antv-dagre', + controlPoints: true, + radial: true, + rankdir: 'LR', + ranksep: 45, + nodesep: 30 + } }; const LAYOUT_TOPOLOGY_DAGRE: LayoutOptions & { type: 'antv-dagre' } = {