@antv/g6 5.0.29 → 5.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g6.min.js +19 -19
- package/dist/lib/elements/combos/base-combo.d.ts +0 -2
- package/dist/lib/exports.d.ts +2 -1
- package/dist/lib/layouts/fishbone.d.ts +72 -0
- package/dist/lib/layouts/index.d.ts +2 -0
- package/dist/lib/runtime/data.d.ts +28 -0
- package/dist/lib/runtime/element.d.ts +0 -9
- package/dist/lib/utils/z-index.d.ts +8 -0
- package/dist/lib/version.d.ts +1 -1
- package/esm/elements/combos/base-combo.d.ts +0 -2
- package/esm/elements/combos/base-combo.js +1 -7
- package/esm/elements/combos/base-combo.js.map +1 -1
- package/esm/exports.d.ts +2 -1
- package/esm/exports.js +1 -1
- package/esm/exports.js.map +1 -1
- package/esm/layouts/fishbone.d.ts +72 -0
- package/esm/layouts/fishbone.js +209 -0
- package/esm/layouts/fishbone.js.map +1 -0
- package/esm/layouts/index.d.ts +2 -0
- package/esm/layouts/index.js +1 -0
- package/esm/layouts/index.js.map +1 -1
- package/esm/plugins/background/index.js +1 -0
- package/esm/plugins/background/index.js.map +1 -1
- package/esm/plugins/edge-filter-lens/index.js +1 -0
- package/esm/plugins/edge-filter-lens/index.js.map +1 -1
- package/esm/preset.js +2 -0
- package/esm/preset.js.map +1 -1
- package/esm/registry/build-in.js +3 -2
- package/esm/registry/build-in.js.map +1 -1
- package/esm/runtime/data.d.ts +28 -0
- package/esm/runtime/data.js +131 -16
- package/esm/runtime/data.js.map +1 -1
- package/esm/runtime/element.d.ts +0 -9
- package/esm/runtime/element.js +7 -48
- package/esm/runtime/element.js.map +1 -1
- package/esm/runtime/graph.js +8 -9
- package/esm/runtime/graph.js.map +1 -1
- package/esm/utils/z-index.d.ts +8 -0
- package/esm/utils/z-index.js +11 -0
- package/esm/utils/z-index.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/elements/combos/base-combo.d.ts +0 -2
- package/lib/elements/combos/base-combo.js +1 -7
- package/lib/elements/combos/base-combo.js.map +1 -1
- package/lib/exports.d.ts +2 -1
- package/lib/exports.js +3 -2
- package/lib/exports.js.map +1 -1
- package/lib/layouts/fishbone.d.ts +72 -0
- package/lib/layouts/fishbone.js +213 -0
- package/lib/layouts/fishbone.js.map +1 -0
- package/lib/layouts/index.d.ts +2 -0
- package/lib/layouts/index.js +3 -1
- package/lib/layouts/index.js.map +1 -1
- package/lib/plugins/background/index.js +1 -0
- package/lib/plugins/background/index.js.map +1 -1
- package/lib/plugins/edge-filter-lens/index.js +1 -0
- package/lib/plugins/edge-filter-lens/index.js.map +1 -1
- package/lib/preset.js +2 -0
- package/lib/preset.js.map +1 -1
- package/lib/registry/build-in.js +2 -1
- package/lib/registry/build-in.js.map +1 -1
- package/lib/runtime/data.d.ts +28 -0
- package/lib/runtime/data.js +130 -15
- package/lib/runtime/data.js.map +1 -1
- package/lib/runtime/element.d.ts +0 -9
- package/lib/runtime/element.js +7 -48
- package/lib/runtime/element.js.map +1 -1
- package/lib/runtime/graph.js +8 -9
- package/lib/runtime/graph.js.map +1 -1
- package/lib/utils/z-index.d.ts +8 -0
- package/lib/utils/z-index.js +14 -0
- package/lib/utils/z-index.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +6 -6
- package/src/elements/combos/base-combo.ts +1 -8
- package/src/exports.ts +2 -0
- package/src/layouts/fishbone.ts +295 -0
- package/src/layouts/index.ts +2 -0
- package/src/plugins/background/index.ts +1 -0
- package/src/plugins/edge-filter-lens/index.ts +1 -0
- package/src/preset.ts +3 -0
- package/src/registry/build-in.ts +3 -1
- package/src/runtime/data.ts +145 -16
- package/src/runtime/element.ts +5 -55
- package/src/runtime/graph.ts +8 -8
- package/src/utils/z-index.ts +11 -0
- package/src/version.ts +1 -1
|
@@ -75,13 +75,11 @@ export declare abstract class BaseCombo<S extends BaseComboStyleProps = BaseComb
|
|
|
75
75
|
protected drawCollapsedMarkerShape(attributes: Required<S>, container: Group): void;
|
|
76
76
|
protected getCollapsedMarkerStyle(attributes: Required<S>): IconStyleProps | false;
|
|
77
77
|
protected getCollapsedMarkerText(type: CollapsedMarkerStyleProps['type'], attributes: Required<S>): string;
|
|
78
|
-
protected getComboZIndex(attributes: Required<S>): number;
|
|
79
78
|
getComboPosition(attributes: Required<S>): Point;
|
|
80
79
|
protected getComboStyle(attributes: Required<S>): {
|
|
81
80
|
x: number;
|
|
82
81
|
y: number;
|
|
83
82
|
transform: (string | number)[][];
|
|
84
|
-
zIndex: number;
|
|
85
83
|
};
|
|
86
84
|
protected updateComboPosition(attributes: Required<S>): void;
|
|
87
85
|
render(attributes: Required<S>, container?: Group): void;
|
package/dist/lib/exports.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { BaseEdge, Cubic, CubicHorizontal, CubicRadial, CubicVertical, Line, Pol
|
|
|
5
5
|
export { effect } from './elements/effect';
|
|
6
6
|
export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
|
|
7
7
|
export { Badge, BaseShape, Icon, Label } from './elements/shapes';
|
|
8
|
-
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
8
|
+
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, FishboneLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
9
9
|
export { Background, BasePlugin, BubbleSets, CameraSetting, Contextmenu, EdgeBundling, EdgeFilterLens, Fisheye, Fullscreen, GridLine, History, Hull, Legend, Minimap, Snapline, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
|
|
10
10
|
export { getExtension, getExtensions } from './registry/get';
|
|
11
11
|
export { register } from './registry/register';
|
|
@@ -33,6 +33,7 @@ export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, DonutStyl
|
|
|
33
33
|
export type { BadgeStyleProps, BaseShapeStyleProps, IconStyleProps, LabelStyleProps, PolygonStyleProps, } from './elements/shapes';
|
|
34
34
|
export type { UpsertHooks } from './elements/shapes/base-shape';
|
|
35
35
|
export type { ContourLabelStyleProps, ContourStyleProps } from './elements/shapes/contour';
|
|
36
|
+
export type { FishboneLayoutOptions } from './layouts';
|
|
36
37
|
export type { BaseLayoutOptions, WebWorkerLayoutOptions } from './layouts/types';
|
|
37
38
|
export type { CategoricalPalette } from './palettes/types';
|
|
38
39
|
export type { BackgroundOptions, BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, EdgeBundlingOptions, EdgeFilterLensOptions, FisheyeOptions, FullscreenOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, MinimapOptions, SnaplineOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { GraphData, NodeData } from '../spec';
|
|
2
|
+
import type { Size } from '../types';
|
|
3
|
+
import { BaseLayout } from './base-layout';
|
|
4
|
+
export interface FishboneLayoutOptions {
|
|
5
|
+
/**
|
|
6
|
+
* <zh/> 节点大小
|
|
7
|
+
*
|
|
8
|
+
* <en/> Node size
|
|
9
|
+
*/
|
|
10
|
+
nodeSize?: Size | ((node: NodeData) => Size);
|
|
11
|
+
/**
|
|
12
|
+
* <zh/> 排布方向
|
|
13
|
+
* - `'RL'` 从右到左,鱼头在右
|
|
14
|
+
* - `'LR'` 从左到右,鱼头在左
|
|
15
|
+
*
|
|
16
|
+
* <en/> Layout direction
|
|
17
|
+
* - `'RL'` From right to left, the fish head is on the right
|
|
18
|
+
* - `'LR'` From left to right, the fish head is on the left
|
|
19
|
+
* @defaultValue `'LR'`
|
|
20
|
+
*/
|
|
21
|
+
direction?: 'RL' | 'LR';
|
|
22
|
+
/**
|
|
23
|
+
* <zh/> 获取水平间距
|
|
24
|
+
*
|
|
25
|
+
* <en/> Get horizontal spacing
|
|
26
|
+
*/
|
|
27
|
+
hGap?: number;
|
|
28
|
+
/**
|
|
29
|
+
* <zh/> 获取垂直间距
|
|
30
|
+
*
|
|
31
|
+
* <en/> Get vertical spacing
|
|
32
|
+
*/
|
|
33
|
+
vGap?: number;
|
|
34
|
+
/**
|
|
35
|
+
* <zh/> 获取鱼骨间距
|
|
36
|
+
*
|
|
37
|
+
* <en/> Get rib separation
|
|
38
|
+
* @defaultValue () => 60
|
|
39
|
+
*/
|
|
40
|
+
getRibSep?: (node: NodeData) => number;
|
|
41
|
+
/**
|
|
42
|
+
* <zh/> 布局宽度
|
|
43
|
+
*
|
|
44
|
+
* <en/> Layout width
|
|
45
|
+
*/
|
|
46
|
+
width?: number;
|
|
47
|
+
/**
|
|
48
|
+
* <zh/> 布局高度
|
|
49
|
+
*
|
|
50
|
+
* <en/> Layout height
|
|
51
|
+
*/
|
|
52
|
+
height?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* <zh/> 鱼骨图布局
|
|
56
|
+
*
|
|
57
|
+
* <en/> Fishbone layout
|
|
58
|
+
* @remarks
|
|
59
|
+
* <zh/> [鱼骨图布局](https://en.wikipedia.org/wiki/Ishikawa_diagram)是一种专门用于表示层次结构数据的图形布局方式。它通过模拟鱼骨的形状,将数据节点按照层次结构排列,使得数据的层次关系更加清晰直观。鱼骨图布局特别适用于需要展示因果关系、层次结构或分类信息的数据集。
|
|
60
|
+
*
|
|
61
|
+
* <en/> [Fishbone layout](https://en.wikipedia.org/wiki/Ishikawa_diagram) is a graphical layout method specifically designed to represent hierarchical data. By simulating the shape of a fishbone, it arranges data nodes according to their hierarchical structure, making the hierarchical relationships of the data clearer and more intuitive. The fishbone diagram layout is particularly suitable for datasets that need to display causal relationships, hierarchical structures, or classification information.
|
|
62
|
+
*/
|
|
63
|
+
export declare class FishboneLayout extends BaseLayout {
|
|
64
|
+
id: string;
|
|
65
|
+
static defaultOptions: Partial<FishboneLayoutOptions>;
|
|
66
|
+
private getRoot;
|
|
67
|
+
private formatSize;
|
|
68
|
+
private doLayout;
|
|
69
|
+
private placeAlterative;
|
|
70
|
+
private rightToLeft;
|
|
71
|
+
execute(data: GraphData, propOptions: FishboneLayoutOptions): Promise<GraphData>;
|
|
72
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy';
|
|
2
2
|
export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
|
|
3
3
|
export { BaseLayout } from './base-layout';
|
|
4
|
+
export { FishboneLayout } from './fishbone';
|
|
5
|
+
export type { FishboneLayoutOptions } from './fishbone';
|
|
@@ -47,6 +47,7 @@ export declare class DataController {
|
|
|
47
47
|
getChanges(): DataChange[];
|
|
48
48
|
clearChanges(): void;
|
|
49
49
|
batch(callback: () => void): void;
|
|
50
|
+
protected isBatching(): boolean;
|
|
50
51
|
/**
|
|
51
52
|
* <zh/> 执行操作而不会留下记录
|
|
52
53
|
*
|
|
@@ -118,6 +119,33 @@ export declare class DataController {
|
|
|
118
119
|
addEdgeData(edges?: EdgeData[]): void;
|
|
119
120
|
addComboData(combos?: ComboData[]): void;
|
|
120
121
|
addChildrenData(parentId: ID, childrenData: NodeData[]): void;
|
|
122
|
+
/**
|
|
123
|
+
* <zh/> 计算 zIndex
|
|
124
|
+
*
|
|
125
|
+
* <en/> Calculate zIndex
|
|
126
|
+
* @param data - <zh/> 新增的数据 | <en/> newly added data
|
|
127
|
+
* @param type - <zh/> 操作类型 | <en/> operation type
|
|
128
|
+
* @param force - <zh/> 忽略批处理 | <en/> ignore batch processing
|
|
129
|
+
* @remarks
|
|
130
|
+
* <zh/> 调用该函数的情况:
|
|
131
|
+
* - 新增元素
|
|
132
|
+
* - 更新节点/组合的 combo
|
|
133
|
+
* - 更新节点的 children
|
|
134
|
+
*
|
|
135
|
+
* <en/> The situation of calling this function:
|
|
136
|
+
* - Add element
|
|
137
|
+
* - Update the combo of the node/combo
|
|
138
|
+
* - Update the children of the node
|
|
139
|
+
*/
|
|
140
|
+
protected computeZIndex(data: PartialGraphData, type: 'add' | 'update', force?: boolean): void;
|
|
141
|
+
/**
|
|
142
|
+
* <zh/> 计算元素置顶后的 zIndex
|
|
143
|
+
*
|
|
144
|
+
* <en/> Calculate the zIndex after the element is placed on top
|
|
145
|
+
* @param id - <zh/> 元素 ID | <en/> ID of the element
|
|
146
|
+
* @returns <zh/> zIndex | <en/> zIndex
|
|
147
|
+
*/
|
|
148
|
+
getFrontZIndex(id: ID): number;
|
|
121
149
|
protected updateNodeLikeHierarchy(data: NodeLikeData[]): void;
|
|
122
150
|
private enableUpdateNodeLikeHierarchy;
|
|
123
151
|
/**
|
|
@@ -51,7 +51,6 @@ export declare class ElementController {
|
|
|
51
51
|
getStateStyle(id: ID): Record<string, unknown>;
|
|
52
52
|
private computeStyle;
|
|
53
53
|
getElement<T extends Element>(id: ID): T | undefined;
|
|
54
|
-
getElementZIndex(id: ID): number;
|
|
55
54
|
getNodes(): Node[];
|
|
56
55
|
getEdges(): Edge[];
|
|
57
56
|
getCombos(): Combo[];
|
|
@@ -98,14 +97,6 @@ export declare class ElementController {
|
|
|
98
97
|
expandNode(id: ID, animation: boolean): Promise<void>;
|
|
99
98
|
collapseCombo(id: ID, animation: boolean): Promise<void>;
|
|
100
99
|
expandCombo(id: ID, animation: boolean): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* <zh/> 计算元素置顶后的 zIndex
|
|
103
|
-
*
|
|
104
|
-
* <en/> Calculate the zIndex after the element is placed on top
|
|
105
|
-
* @param id - <zh/> 元素 ID | <en/> ID of the element
|
|
106
|
-
* @returns <zh/> zIndex | <en/> zIndex
|
|
107
|
-
*/
|
|
108
|
-
getFrontZIndex(id: ID): number;
|
|
109
100
|
destroy(): void;
|
|
110
101
|
}
|
|
111
102
|
export interface DrawContext {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementDatum } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* <zh/> 获取元素的 zIndex
|
|
4
|
+
* <en/> Get the zIndex of the element
|
|
5
|
+
* @param datum - <zh/> 元素数据 | <en/> element data
|
|
6
|
+
* @returns - <zh/> zIndex | <en/> zIndex
|
|
7
|
+
*/
|
|
8
|
+
export declare function getZIndexOf(datum: ElementDatum): number;
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.0.
|
|
1
|
+
export declare const version = "5.0.30";
|
|
@@ -75,13 +75,11 @@ export declare abstract class BaseCombo<S extends BaseComboStyleProps = BaseComb
|
|
|
75
75
|
protected drawCollapsedMarkerShape(attributes: Required<S>, container: Group): void;
|
|
76
76
|
protected getCollapsedMarkerStyle(attributes: Required<S>): IconStyleProps | false;
|
|
77
77
|
protected getCollapsedMarkerText(type: CollapsedMarkerStyleProps['type'], attributes: Required<S>): string;
|
|
78
|
-
protected getComboZIndex(attributes: Required<S>): number;
|
|
79
78
|
getComboPosition(attributes: Required<S>): Point;
|
|
80
79
|
protected getComboStyle(attributes: Required<S>): {
|
|
81
80
|
x: number;
|
|
82
81
|
y: number;
|
|
83
82
|
transform: (string | number)[][];
|
|
84
|
-
zIndex: number;
|
|
85
83
|
};
|
|
86
84
|
protected updateComboPosition(attributes: Required<S>): void;
|
|
87
85
|
render(attributes: Required<S>, container?: Group): void;
|
|
@@ -11,7 +11,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { AABB } from '@antv/g';
|
|
13
13
|
import { isFunction } from '@antv/util';
|
|
14
|
-
import { COMBO_KEY } from '../../constants';
|
|
15
14
|
import { getBBoxHeight, getBBoxWidth, getCombinedBBox, getExpandedBBox } from '../../utils/bbox';
|
|
16
15
|
import { idOf } from '../../utils/id';
|
|
17
16
|
import { parsePadding } from '../../utils/padding';
|
|
@@ -108,10 +107,6 @@ export class BaseCombo extends BaseNode {
|
|
|
108
107
|
return type(childrenData);
|
|
109
108
|
return '';
|
|
110
109
|
}
|
|
111
|
-
getComboZIndex(attributes) {
|
|
112
|
-
const ancestors = this.context.model.getAncestorsData(this.id, COMBO_KEY) || [];
|
|
113
|
-
return ancestors.length;
|
|
114
|
-
}
|
|
115
110
|
getComboPosition(attributes) {
|
|
116
111
|
const { x = 0, y = 0, collapsed, context, childrenData = [] } = attributes;
|
|
117
112
|
if (childrenData.length === 0)
|
|
@@ -130,10 +125,9 @@ export class BaseCombo extends BaseNode {
|
|
|
130
125
|
return this.getContentBBox(attributes).center;
|
|
131
126
|
}
|
|
132
127
|
getComboStyle(attributes) {
|
|
133
|
-
const { zIndex = this.getComboZIndex(attributes) } = attributes;
|
|
134
128
|
const [x, y] = this.getComboPosition(attributes);
|
|
135
129
|
// x/y will be used to calculate position later.
|
|
136
|
-
return { x, y, transform: [['translate', x, y]]
|
|
130
|
+
return { x, y, transform: [['translate', x, y]] };
|
|
137
131
|
}
|
|
138
132
|
updateComboPosition(attributes) {
|
|
139
133
|
const comboStyle = this.getComboStyle(attributes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-combo.js","sourceRoot":"src/","sources":["elements/combos/base-combo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAA6D,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"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CACnC,AAZuB,CAYtB"}
|
package/esm/exports.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { BaseEdge, Cubic, CubicHorizontal, CubicRadial, CubicVertical, Line, Pol
|
|
|
5
5
|
export { effect } from './elements/effect';
|
|
6
6
|
export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
|
|
7
7
|
export { Badge, BaseShape, Icon, Label } from './elements/shapes';
|
|
8
|
-
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
8
|
+
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, FishboneLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
9
9
|
export { Background, BasePlugin, BubbleSets, CameraSetting, Contextmenu, EdgeBundling, EdgeFilterLens, Fisheye, Fullscreen, GridLine, History, Hull, Legend, Minimap, Snapline, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
|
|
10
10
|
export { getExtension, getExtensions } from './registry/get';
|
|
11
11
|
export { register } from './registry/register';
|
|
@@ -33,6 +33,7 @@ export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, DonutStyl
|
|
|
33
33
|
export type { BadgeStyleProps, BaseShapeStyleProps, IconStyleProps, LabelStyleProps, PolygonStyleProps, } from './elements/shapes';
|
|
34
34
|
export type { UpsertHooks } from './elements/shapes/base-shape';
|
|
35
35
|
export type { ContourLabelStyleProps, ContourStyleProps } from './elements/shapes/contour';
|
|
36
|
+
export type { FishboneLayoutOptions } from './layouts';
|
|
36
37
|
export type { BaseLayoutOptions, WebWorkerLayoutOptions } from './layouts/types';
|
|
37
38
|
export type { CategoricalPalette } from './palettes/types';
|
|
38
39
|
export type { BackgroundOptions, BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, EdgeBundlingOptions, EdgeFilterLensOptions, FisheyeOptions, FullscreenOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, MinimapOptions, SnaplineOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
|
package/esm/exports.js
CHANGED
|
@@ -5,7 +5,7 @@ export { BaseEdge, Cubic, CubicHorizontal, CubicRadial, CubicVertical, Line, Pol
|
|
|
5
5
|
export { effect } from './elements/effect';
|
|
6
6
|
export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
|
|
7
7
|
export { Badge, BaseShape, Icon, Label } from './elements/shapes';
|
|
8
|
-
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
8
|
+
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, FishboneLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
9
9
|
export { Background, BasePlugin, BubbleSets, CameraSetting, Contextmenu, EdgeBundling, EdgeFilterLens, Fisheye, Fullscreen, GridLine, History, Hull, Legend, Minimap, Snapline, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
|
|
10
10
|
export { getExtension, getExtensions } from './registry/get';
|
|
11
11
|
export { register } from './registry/register';
|
package/esm/exports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"src/","sources":["exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,UAAU,EACV,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,eAAe,EACf,WAAW,EACX,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EACL,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,UAAU,IAAI,gBAAgB,EAC9B,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,UAAU,IAAI,gBAAgB,EAC9B,iBAAiB,EACjB,W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a,EACb,WAAW,EACX,YAAY,EACZ,cAAc,EACd,OAAO,EACP,UAAU,EACV,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { GraphData, NodeData } from '../spec';
|
|
2
|
+
import type { Size } from '../types';
|
|
3
|
+
import { BaseLayout } from './base-layout';
|
|
4
|
+
export interface FishboneLayoutOptions {
|
|
5
|
+
/**
|
|
6
|
+
* <zh/> 节点大小
|
|
7
|
+
*
|
|
8
|
+
* <en/> Node size
|
|
9
|
+
*/
|
|
10
|
+
nodeSize?: Size | ((node: NodeData) => Size);
|
|
11
|
+
/**
|
|
12
|
+
* <zh/> 排布方向
|
|
13
|
+
* - `'RL'` 从右到左,鱼头在右
|
|
14
|
+
* - `'LR'` 从左到右,鱼头在左
|
|
15
|
+
*
|
|
16
|
+
* <en/> Layout direction
|
|
17
|
+
* - `'RL'` From right to left, the fish head is on the right
|
|
18
|
+
* - `'LR'` From left to right, the fish head is on the left
|
|
19
|
+
* @defaultValue `'LR'`
|
|
20
|
+
*/
|
|
21
|
+
direction?: 'RL' | 'LR';
|
|
22
|
+
/**
|
|
23
|
+
* <zh/> 获取水平间距
|
|
24
|
+
*
|
|
25
|
+
* <en/> Get horizontal spacing
|
|
26
|
+
*/
|
|
27
|
+
hGap?: number;
|
|
28
|
+
/**
|
|
29
|
+
* <zh/> 获取垂直间距
|
|
30
|
+
*
|
|
31
|
+
* <en/> Get vertical spacing
|
|
32
|
+
*/
|
|
33
|
+
vGap?: number;
|
|
34
|
+
/**
|
|
35
|
+
* <zh/> 获取鱼骨间距
|
|
36
|
+
*
|
|
37
|
+
* <en/> Get rib separation
|
|
38
|
+
* @defaultValue () => 60
|
|
39
|
+
*/
|
|
40
|
+
getRibSep?: (node: NodeData) => number;
|
|
41
|
+
/**
|
|
42
|
+
* <zh/> 布局宽度
|
|
43
|
+
*
|
|
44
|
+
* <en/> Layout width
|
|
45
|
+
*/
|
|
46
|
+
width?: number;
|
|
47
|
+
/**
|
|
48
|
+
* <zh/> 布局高度
|
|
49
|
+
*
|
|
50
|
+
* <en/> Layout height
|
|
51
|
+
*/
|
|
52
|
+
height?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* <zh/> 鱼骨图布局
|
|
56
|
+
*
|
|
57
|
+
* <en/> Fishbone layout
|
|
58
|
+
* @remarks
|
|
59
|
+
* <zh/> [鱼骨图布局](https://en.wikipedia.org/wiki/Ishikawa_diagram)是一种专门用于表示层次结构数据的图形布局方式。它通过模拟鱼骨的形状,将数据节点按照层次结构排列,使得数据的层次关系更加清晰直观。鱼骨图布局特别适用于需要展示因果关系、层次结构或分类信息的数据集。
|
|
60
|
+
*
|
|
61
|
+
* <en/> [Fishbone layout](https://en.wikipedia.org/wiki/Ishikawa_diagram) is a graphical layout method specifically designed to represent hierarchical data. By simulating the shape of a fishbone, it arranges data nodes according to their hierarchical structure, making the hierarchical relationships of the data clearer and more intuitive. The fishbone diagram layout is particularly suitable for datasets that need to display causal relationships, hierarchical structures, or classification information.
|
|
62
|
+
*/
|
|
63
|
+
export declare class FishboneLayout extends BaseLayout {
|
|
64
|
+
id: string;
|
|
65
|
+
static defaultOptions: Partial<FishboneLayoutOptions>;
|
|
66
|
+
private getRoot;
|
|
67
|
+
private formatSize;
|
|
68
|
+
private doLayout;
|
|
69
|
+
private placeAlterative;
|
|
70
|
+
private rightToLeft;
|
|
71
|
+
execute(data: GraphData, propOptions: FishboneLayoutOptions): Promise<GraphData>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { isEmpty, memoize } from '@antv/util';
|
|
11
|
+
import { idOf } from '../exports';
|
|
12
|
+
import { parseSize } from '../utils/size';
|
|
13
|
+
import { BaseLayout } from './base-layout';
|
|
14
|
+
/**
|
|
15
|
+
* <zh/> 鱼骨图布局
|
|
16
|
+
*
|
|
17
|
+
* <en/> Fishbone layout
|
|
18
|
+
* @remarks
|
|
19
|
+
* <zh/> [鱼骨图布局](https://en.wikipedia.org/wiki/Ishikawa_diagram)是一种专门用于表示层次结构数据的图形布局方式。它通过模拟鱼骨的形状,将数据节点按照层次结构排列,使得数据的层次关系更加清晰直观。鱼骨图布局特别适用于需要展示因果关系、层次结构或分类信息的数据集。
|
|
20
|
+
*
|
|
21
|
+
* <en/> [Fishbone layout](https://en.wikipedia.org/wiki/Ishikawa_diagram) is a graphical layout method specifically designed to represent hierarchical data. By simulating the shape of a fishbone, it arranges data nodes according to their hierarchical structure, making the hierarchical relationships of the data clearer and more intuitive. The fishbone diagram layout is particularly suitable for datasets that need to display causal relationships, hierarchical structures, or classification information.
|
|
22
|
+
*/
|
|
23
|
+
export class FishboneLayout extends BaseLayout {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.id = 'fishbone';
|
|
27
|
+
}
|
|
28
|
+
getRoot() {
|
|
29
|
+
const roots = this.context.model.getRootsData();
|
|
30
|
+
if (isEmpty(roots) || roots.length > 2)
|
|
31
|
+
return;
|
|
32
|
+
return roots[0];
|
|
33
|
+
}
|
|
34
|
+
formatSize(nodeSize) {
|
|
35
|
+
const nodeSizeFunc = typeof nodeSize === 'function' ? nodeSize : () => nodeSize;
|
|
36
|
+
return (node) => parseSize(nodeSizeFunc(node));
|
|
37
|
+
}
|
|
38
|
+
doLayout(root, options) {
|
|
39
|
+
const { hGap, getRibSep, vGap, nodeSize, height } = options;
|
|
40
|
+
const { model } = this.context;
|
|
41
|
+
const getSize = this.formatSize(nodeSize);
|
|
42
|
+
let ribX = getSize(root)[0] + getRibSep(root);
|
|
43
|
+
const getHorizontalOffset = (node, result = 0) => {
|
|
44
|
+
var _a;
|
|
45
|
+
result += hGap * ((node.children || []).length + 1);
|
|
46
|
+
(_a = node.children) === null || _a === void 0 ? void 0 : _a.forEach((childId) => {
|
|
47
|
+
var _a;
|
|
48
|
+
const child = model.getNodeLikeDatum(childId);
|
|
49
|
+
(_a = child.children) === null || _a === void 0 ? void 0 : _a.forEach((grandChildId) => {
|
|
50
|
+
const grandChild = model.getNodeLikeDatum(grandChildId);
|
|
51
|
+
result = getHorizontalOffset(grandChild, result);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
const getAuxiliaryPoint = (node) => {
|
|
57
|
+
if (node.depth === 1)
|
|
58
|
+
return ribX;
|
|
59
|
+
const parent = model.getParentData(node.id, 'tree');
|
|
60
|
+
if (isAtEvenDepth(node)) {
|
|
61
|
+
const ancestor = model.getParentData(parent.id, 'tree');
|
|
62
|
+
const deltaY = calculateY(node) - calculateY(ancestor);
|
|
63
|
+
return getAuxiliaryPoint(parent) + (deltaY * hGap) / vGap;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const nodeIndex = (parent.children || []).indexOf(node.id);
|
|
67
|
+
const followingSiblingsIncludeSelf = model.getNodeData((parent.children || []).slice(nodeIndex));
|
|
68
|
+
return (calculateX(parent) -
|
|
69
|
+
followingSiblingsIncludeSelf.reduce((acc, sibling) => acc + getHorizontalOffset(sibling), 0) -
|
|
70
|
+
getSize(parent)[0] / 2);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const calculateX = memoize((node) => {
|
|
74
|
+
if (isRoot(node))
|
|
75
|
+
return getSize(node)[0] / 2;
|
|
76
|
+
const parent = model.getParentData(node.id, 'tree');
|
|
77
|
+
if (isAtEvenDepth(node)) {
|
|
78
|
+
return getAuxiliaryPoint(node) + getHorizontalOffset(node) + getSize(node)[0] / 2;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const deltaY = calculateY(node) - calculateY(parent);
|
|
82
|
+
const ratio = hGap / vGap;
|
|
83
|
+
return getAuxiliaryPoint(node) + deltaY * ratio;
|
|
84
|
+
}
|
|
85
|
+
}, (node) => node.id);
|
|
86
|
+
const getParentY = (nodeId) => calculateY(model.getParentData(nodeId, 'tree'));
|
|
87
|
+
const calculateY = memoize((node) => {
|
|
88
|
+
if (isRoot(node))
|
|
89
|
+
return height / 2;
|
|
90
|
+
if (!isAtEvenDepth(node)) {
|
|
91
|
+
// If the node has no children, calculate Y based on the parent
|
|
92
|
+
if (isEmpty(node.children))
|
|
93
|
+
return getParentY(node.id) + vGap;
|
|
94
|
+
// If the last child has no children, calculate Y based on the last child
|
|
95
|
+
const lastChild = model.getNodeLikeDatum(node.children.slice(-1)[0]);
|
|
96
|
+
if (isEmpty(lastChild.children))
|
|
97
|
+
return calculateY(lastChild) + vGap;
|
|
98
|
+
// If the last child has children, calculate Y based on the last descendant of the last child
|
|
99
|
+
const lastDescendant = model.getDescendantsData(node.id).slice(-1)[0];
|
|
100
|
+
return (isAtEvenDepth(lastDescendant) ? getParentY(lastDescendant.id) : calculateY(lastDescendant)) + vGap;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
// depth > 0 && isAtEvenDepth(node)
|
|
104
|
+
const parent = model.getParentData(node.id, 'tree');
|
|
105
|
+
const nodeIndex = parent.children.indexOf(node.id);
|
|
106
|
+
// If the node is the first sibling, return Y based on parent
|
|
107
|
+
if (nodeIndex === 0)
|
|
108
|
+
return getParentY(parent.id) + vGap;
|
|
109
|
+
// If the previous sibling has no children, calculate Y based on the previous sibling
|
|
110
|
+
const prevSibling = model.getNodeLikeDatum(parent.children[nodeIndex - 1]);
|
|
111
|
+
if (isEmpty(prevSibling.children))
|
|
112
|
+
return calculateY(prevSibling) + vGap;
|
|
113
|
+
// If the previous sibling has children, calculate Y based on the last descendant of the previous sibling
|
|
114
|
+
const descendants = model.getDescendantsData(prevSibling.id);
|
|
115
|
+
return (Math.max(...descendants.map((descendant) => isAtEvenDepth(descendant) ? getParentY(descendant.id) : calculateY(descendant))) + vGap);
|
|
116
|
+
}
|
|
117
|
+
}, (node) => node.id);
|
|
118
|
+
let tmpRibX = 0;
|
|
119
|
+
const result = { nodes: [], edges: [] };
|
|
120
|
+
const layout = (node) => {
|
|
121
|
+
var _a;
|
|
122
|
+
(_a = node.children) === null || _a === void 0 ? void 0 : _a.forEach((childId) => layout(model.getNodeLikeDatum(childId)));
|
|
123
|
+
const y = calculateY(node);
|
|
124
|
+
const x = calculateX(node);
|
|
125
|
+
result.nodes.push({ id: node.id, x, y });
|
|
126
|
+
if (isRoot(node))
|
|
127
|
+
return;
|
|
128
|
+
const edge = model.getRelatedEdgesData(node.id, 'in')[0];
|
|
129
|
+
const controlPoint = [getAuxiliaryPoint(node), isAtEvenDepth(node) ? y : getParentY(node.id)];
|
|
130
|
+
result.edges.push({ id: idOf(edge), controlPoints: [controlPoint], relatedNodeId: node.id });
|
|
131
|
+
tmpRibX = Math.max(tmpRibX, x + getRibSep(node));
|
|
132
|
+
if (node.depth === 1)
|
|
133
|
+
ribX = tmpRibX;
|
|
134
|
+
};
|
|
135
|
+
layout(root);
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
placeAlterative(result, root) {
|
|
139
|
+
const oddIndexedRibs = (root.children || []).filter((_, index) => index % 2 !== 0);
|
|
140
|
+
if (oddIndexedRibs.length === 0)
|
|
141
|
+
return result;
|
|
142
|
+
const { model } = this.context;
|
|
143
|
+
const rootY = result.nodes.find((node) => node.id === root.id).y;
|
|
144
|
+
const shouldFlip = (nodeId) => {
|
|
145
|
+
const ancestors = model.getAncestorsData(nodeId, 'tree');
|
|
146
|
+
if (isEmpty(ancestors))
|
|
147
|
+
return false;
|
|
148
|
+
const ribId = ancestors.length === 1 ? nodeId : ancestors[ancestors.length - 2].id;
|
|
149
|
+
return oddIndexedRibs.includes(ribId);
|
|
150
|
+
};
|
|
151
|
+
result.nodes.forEach((node) => {
|
|
152
|
+
if (shouldFlip(node.id))
|
|
153
|
+
node.y = 2 * rootY - node.y;
|
|
154
|
+
});
|
|
155
|
+
result.edges.forEach((edge) => {
|
|
156
|
+
if (shouldFlip(edge.relatedNodeId)) {
|
|
157
|
+
edge.controlPoints = edge.controlPoints.map((point) => [point[0], 2 * rootY - point[1]]);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
rightToLeft(result, options) {
|
|
162
|
+
result.nodes.forEach((node) => (node.x = options.width - node.x));
|
|
163
|
+
result.edges.forEach((edge) => {
|
|
164
|
+
edge.controlPoints = edge.controlPoints.map((point) => [options.width - point[0], point[1]]);
|
|
165
|
+
});
|
|
166
|
+
return result;
|
|
167
|
+
}
|
|
168
|
+
execute(data, propOptions) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const options = Object.assign(Object.assign(Object.assign({}, FishboneLayout.defaultOptions), this.options), propOptions);
|
|
171
|
+
const { direction, nodeSize } = options;
|
|
172
|
+
const root = this.getRoot();
|
|
173
|
+
if (!root)
|
|
174
|
+
return data;
|
|
175
|
+
const getSize = this.formatSize(nodeSize);
|
|
176
|
+
options.vGap || (options.vGap = Math.max(...(data.nodes || []).map((node) => getSize(node)[1])));
|
|
177
|
+
options.hGap || (options.hGap = Math.max(...(data.nodes || []).map((node) => getSize(node)[0])));
|
|
178
|
+
let result = this.doLayout(root, options);
|
|
179
|
+
this.placeAlterative(result, root);
|
|
180
|
+
if (direction === 'RL') {
|
|
181
|
+
result = this.rightToLeft(result, options);
|
|
182
|
+
}
|
|
183
|
+
const { model } = this.context;
|
|
184
|
+
const nodes = [];
|
|
185
|
+
const edges = [];
|
|
186
|
+
result.nodes.forEach((node) => {
|
|
187
|
+
const { id, x, y } = node;
|
|
188
|
+
const nodeData = model.getNodeLikeDatum(id);
|
|
189
|
+
nodes.push(assignElementStyle(nodeData, { x, y }));
|
|
190
|
+
});
|
|
191
|
+
result.edges.forEach((edge) => {
|
|
192
|
+
const { id, controlPoints } = edge;
|
|
193
|
+
const edgeData = model.getEdgeDatum(id);
|
|
194
|
+
edges.push(assignElementStyle(edgeData, { controlPoints }));
|
|
195
|
+
});
|
|
196
|
+
return { nodes, edges };
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
FishboneLayout.defaultOptions = {
|
|
201
|
+
direction: 'RL',
|
|
202
|
+
getRibSep: () => 60,
|
|
203
|
+
};
|
|
204
|
+
const assignElementStyle = (element, style) => {
|
|
205
|
+
return Object.assign(Object.assign({}, element), { style: Object.assign(Object.assign({}, (element.style || {})), style) });
|
|
206
|
+
};
|
|
207
|
+
const isRoot = (node) => node.depth === 0;
|
|
208
|
+
const isAtEvenDepth = (node) => (node.depth || (node.depth = 0)) % 2 === 0;
|
|
209
|
+
//# sourceMappingURL=fishbone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fishbone.js","sourceRoot":"src/","sources":["layouts/fishbone.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAyD3C;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAA9C;;QACE,OAAE,GAAG,UAAU,CAAC;IAsNlB,CAAC;IA/MS,OAAO;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAChD,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO;QAE/C,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAEO,UAAU,CAAC,QAA2C;QAC5D,MAAM,YAAY,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;QAChF,OAAO,CAAC,IAAc,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,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CAAa,CAAC,CAAC;YACjE,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC5B,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;gBACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;gBACxC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,CAAa,CAAC,CAAC;YAC1E,CAAC,CAAC,CAAC;YAEH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC1B,CAAC;KAAA;;AAnNM,6BAAc,GAAmC;IACtD,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE;CACpB,AAHoB,CAGnB;AAmNJ,MAAM,kBAAkB,GAAG,CAAC,OAAqB,EAAE,KAA8B,EAAE,EAAE;IACnF,uCAAY,OAAO,KAAE,KAAK,kCAAO,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,GAAK,KAAK,KAAK;AACvE,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAEpD,MAAM,aAAa,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,KAAV,IAAI,CAAC,KAAK,GAAK,CAAC,EAAC,GAAG,CAAC,KAAK,CAAC,CAAC"}
|
package/esm/layouts/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy';
|
|
2
2
|
export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
|
|
3
3
|
export { BaseLayout } from './base-layout';
|
|
4
|
+
export { FishboneLayout } from './fishbone';
|
|
5
|
+
export type { FishboneLayoutOptions } from './fishbone';
|
package/esm/layouts/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy';
|
|
2
2
|
export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
|
|
3
3
|
export { BaseLayout } from './base-layout';
|
|
4
|
+
export { FishboneLayout } from './fishbone';
|
|
4
5
|
//# sourceMappingURL=index.js.map
|