From d1bff78190b710cfe904397281ef94eae4697512 Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 5 Sep 2024 17:40:27 +0800 Subject: [PATCH] chore: correct layout comments and file name (#228) * docs: fix typo * chore: update comments of layout * chore: update dict * chore: format filename --- .gitignore | 1 - .vscode/settings.json | 11 ++ packages/layout-gpu/src/fruchterman.ts | 16 +- packages/layout-gpu/src/gforce.ts | 16 +- packages/layout-wasm/src/force.ts | 16 +- packages/layout-wasm/src/forceatlas2.ts | 16 +- packages/layout-wasm/src/fruchterman.ts | 16 +- packages/layout/src/antv-dagre.ts | 14 +- packages/layout/src/circular.ts | 14 +- .../{comboCombined.ts => combo-combined.ts} | 14 +- packages/layout/src/concentric.ts | 16 +- packages/layout/src/dagre.ts | 5 +- packages/layout/src/exports.ts | 4 +- .../src/{forceAtlas2 => force-atlas2}/body.ts | 0 .../{forceAtlas2 => force-atlas2}/index.ts | 18 +- .../quadTree.ts => force-atlas2/quad-tree.ts} | 0 .../src/{forceAtlas2 => force-atlas2}/quad.ts | 0 .../force/{forceNBody.ts => force-n-body.ts} | 0 packages/layout/src/force/index.ts | 18 +- packages/layout/src/fruchterman.ts | 16 +- packages/layout/src/grid.ts | 16 +- packages/layout/src/mds.ts | 16 +- packages/layout/src/radial/index.ts | 16 +- packages/layout/src/random.ts | 16 +- packages/layout/src/registry.ts | 4 +- packages/layout/src/types.ts | 172 +++++++++--------- 26 files changed, 151 insertions(+), 300 deletions(-) create mode 100644 .vscode/settings.json rename packages/layout/src/{comboCombined.ts => combo-combined.ts} (96%) rename packages/layout/src/{forceAtlas2 => force-atlas2}/body.ts (100%) rename packages/layout/src/{forceAtlas2 => force-atlas2}/index.ts (96%) rename packages/layout/src/{forceAtlas2/quadTree.ts => force-atlas2/quad-tree.ts} (100%) rename packages/layout/src/{forceAtlas2 => force-atlas2}/quad.ts (100%) rename packages/layout/src/force/{forceNBody.ts => force-n-body.ts} (100%) diff --git a/.gitignore b/.gitignore index 8d097ab..4a39305 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .DS_Store -.vscode .idea npm-debug.log yarn-error.log diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4986822 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "cSpell.words": [ + "acyclicer", + "edgesep", + "Fruchterman", + "graphlib", + "nodesep", + "rankdir", + "ranksep" + ] +} \ No newline at end of file diff --git a/packages/layout-gpu/src/fruchterman.ts b/packages/layout-gpu/src/fruchterman.ts index 1c659da..6bf06e5 100644 --- a/packages/layout-gpu/src/fruchterman.ts +++ b/packages/layout-gpu/src/fruchterman.ts @@ -35,19 +35,9 @@ interface FormattedOptions extends FruchtermanLayoutOptions { } /** - * Layout with fructherman force model + * Fruchterman 力导向布局(GPU 版) * - * @example - * // Assign layout options when initialization. - * const layout = new FruchtermanLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new FruchtermanLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * Fruchterman force-directed layout(GPU) */ export class FruchtermanLayout implements Layout { id = 'fruchtermanGPU'; @@ -71,7 +61,7 @@ export class FruchtermanLayout implements Layout { * To directly assign the positions to the nodes. */ async assign(graph: Graph, options?: FruchtermanLayoutOptions) { - await this.genericFruchtermanLayout(true, graph, options); + await this.genericFruchtermanLayout(true, graph, options); } private async genericFruchtermanLayout( diff --git a/packages/layout-gpu/src/gforce.ts b/packages/layout-gpu/src/gforce.ts index 637c713..741f5f1 100644 --- a/packages/layout-gpu/src/gforce.ts +++ b/packages/layout-gpu/src/gforce.ts @@ -49,19 +49,9 @@ interface FormattedOptions extends ForceLayoutOptions { } /** - * Layout with faster force - * - * @example - * // Assign layout options when initialization. - * const layout = new GForceLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new GForceLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * 快速力导向布局 + * + * Fast force-directed layout */ export class GForceLayout implements Layout { id = 'gforce'; diff --git a/packages/layout-wasm/src/force.ts b/packages/layout-wasm/src/force.ts index 47c30ee..000b36d 100644 --- a/packages/layout-wasm/src/force.ts +++ b/packages/layout-wasm/src/force.ts @@ -34,19 +34,9 @@ interface WASMForceLayoutOptions WASMLayoutOptions {} /** - * Layout nodes with force model - * - * @example - * // Assign layout options when initialization. - * const layout = new ForceLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new ForceLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * 力导向布局(WASM 版) + * + * Force-directed layout(WASM) */ export class ForceLayout implements Layout { id = 'forceWASM'; diff --git a/packages/layout-wasm/src/forceatlas2.ts b/packages/layout-wasm/src/forceatlas2.ts index 1249457..c9f8b2f 100644 --- a/packages/layout-wasm/src/forceatlas2.ts +++ b/packages/layout-wasm/src/forceatlas2.ts @@ -54,19 +54,9 @@ interface FormattedOptions extends WASMForceAtlas2LayoutOptions { speed: number; } /** - * Layout nodes with force atlas 2 model + * Atlas2 力导向布局(WASM 版) * - * @example - * // Assign layout options when initialization. - * const layout = new ForceAtlas2Layout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new ForceAtlas2Layout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * Force Atlas 2 layout(WASM) */ export class ForceAtlas2Layout implements Layout { id = 'forceAtlas2WASM'; @@ -90,7 +80,7 @@ export class ForceAtlas2Layout implements Layout { * To directly assign the positions to the nodes. */ async assign(graph: Graph, options?: ForceAtlas2LayoutOptions) { - await this.genericForceAtlas2Layout(true, graph, options); + await this.genericForceAtlas2Layout(true, graph, options); } private async genericForceAtlas2Layout( diff --git a/packages/layout-wasm/src/fruchterman.ts b/packages/layout-wasm/src/fruchterman.ts index bc8b9ee..62d49c9 100644 --- a/packages/layout-wasm/src/fruchterman.ts +++ b/packages/layout-wasm/src/fruchterman.ts @@ -39,19 +39,9 @@ interface FormattedOptions extends WASMFruchtermanLayoutOptions { } /** - * Layout with fructherman force model - * - * @example - * // Assign layout options when initialization. - * const layout = new FruchtermanLayout({ threads, center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new FruchtermanLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * Fruchterman 力导向布局(WASM 版) + * + * Fruchterman force-directed layout(WASM) */ export class FruchtermanLayout implements Layout { id = 'fruchtermanWASM'; diff --git a/packages/layout/src/antv-dagre.ts b/packages/layout/src/antv-dagre.ts index 1bb16b7..e3cc53f 100644 --- a/packages/layout/src/antv-dagre.ts +++ b/packages/layout/src/antv-dagre.ts @@ -211,19 +211,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes in a circle. + * AntV 实现的 Dagre 布局 * - * @example - * // Assign layout options when initialization. - * const layout = new CircularLayout({ radius: 10 }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new CircularLayout({ radius: 10 }); - * const positions = await layout.execute(graph, { radius: 20 }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { radius: 20 }); + * AntV implementation of Dagre layout */ export class AntVDagreLayout implements Layout { id = 'antv-dagre'; diff --git a/packages/layout/src/circular.ts b/packages/layout/src/circular.ts index f2d9c70..0972e68 100644 --- a/packages/layout/src/circular.ts +++ b/packages/layout/src/circular.ts @@ -24,19 +24,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes in a circle. + * 环形布局 * - * @example - * // Assign layout options when initialization. - * const layout = new CircularLayout({ radius: 10 }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new CircularLayout({ radius: 10 }); - * const positions = await layout.execute(graph, { radius: 20 }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { radius: 20 }); + * Circular layout */ export class CircularLayout implements Layout { id = 'circular'; diff --git a/packages/layout/src/comboCombined.ts b/packages/layout/src/combo-combined.ts similarity index 96% rename from packages/layout/src/comboCombined.ts rename to packages/layout/src/combo-combined.ts index c082b34..0e969b5 100644 --- a/packages/layout/src/comboCombined.ts +++ b/packages/layout/src/combo-combined.ts @@ -33,19 +33,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes and combos with combination of inner and outer layouts. + * 组合布局 * - * @example - * // Assign layout options when initialization. - * const layout = new ComboCombinedLayout({}); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new ComboCombinedLayout({ radius: 10 }); - * const positions = await layout.execute(graph, { radius: 20 }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { radius: 20 }); + * Combo-Combined layout */ export class ComboCombinedLayout implements Layout { id = 'comboCombined'; diff --git a/packages/layout/src/concentric.ts b/packages/layout/src/concentric.ts index 65ba8ec..eaad139 100644 --- a/packages/layout/src/concentric.ts +++ b/packages/layout/src/concentric.ts @@ -25,19 +25,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes in concentrics - * - * @example - * // Assign layout options when initialization. - * const layout = new ConcentricLayout({ nodeSpacing: 10 }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new ConcentricLayout({ nodeSpacing: 10}); - * const positions = await layout.execute(graph, { nodeSpacing: 10 }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { nodeSpacing: 10 }); + * 同心圆布局 + * + * Concentric layout */ export class ConcentricLayout implements Layout { id = 'concentric'; diff --git a/packages/layout/src/dagre.ts b/packages/layout/src/dagre.ts index 63ef711..89b2aef 100644 --- a/packages/layout/src/dagre.ts +++ b/packages/layout/src/dagre.ts @@ -9,8 +9,9 @@ export interface DagreLayoutOptions extends GraphLabel, NodeConfig, EdgeConfig { } /** - * Adapt dagre.js layout - * @link https://github.com/dagrejs/dagre + * Dagre 布局 + * + * Dagre layout */ export class DagreLayout implements Layout { static defaultOptions: Partial = {}; diff --git a/packages/layout/src/exports.ts b/packages/layout/src/exports.ts index 78baf57..925ea7b 100644 --- a/packages/layout/src/exports.ts +++ b/packages/layout/src/exports.ts @@ -1,7 +1,7 @@ export * from './antv-dagre'; export type { DagreAlign, DagreRankdir } from './antv-dagre/types'; export * from './circular'; -export * from './comboCombined'; +export * from './combo-combined'; export * from './concentric'; export { D3ForceLayout } from './d3-force'; export { D3Force3DLayout } from './d3-force-3d'; @@ -9,7 +9,7 @@ export type { D3Force3DLayoutOptions } from './d3-force-3d/types'; export type { D3ForceLayoutOptions } from './d3-force/types'; export * from './dagre'; export * from './force'; -export * from './forceAtlas2'; +export * from './force-atlas2'; export * from './fruchterman'; export * from './grid'; export * from './mds'; diff --git a/packages/layout/src/forceAtlas2/body.ts b/packages/layout/src/force-atlas2/body.ts similarity index 100% rename from packages/layout/src/forceAtlas2/body.ts rename to packages/layout/src/force-atlas2/body.ts diff --git a/packages/layout/src/forceAtlas2/index.ts b/packages/layout/src/force-atlas2/index.ts similarity index 96% rename from packages/layout/src/forceAtlas2/index.ts rename to packages/layout/src/force-atlas2/index.ts index 838bfad..249820f 100644 --- a/packages/layout/src/forceAtlas2/index.ts +++ b/packages/layout/src/force-atlas2/index.ts @@ -18,7 +18,7 @@ import { cloneFormatData, isArray } from '../util'; import { handleSingleNodeGraph } from '../util/common'; import Body from './body'; import Quad from './quad'; -import QuadTree from './quadTree'; +import QuadTree from './quad-tree'; const DEFAULTS_LAYOUT_OPTIONS: Partial = { center: [0, 0], @@ -56,19 +56,9 @@ type SizeMap = { [id: string]: number }; type CalcGraph = GGraph; /** - * Layout nodes with force atlas 2 model - * - * @example - * // Assign layout options when initialization. - * const layout = new ForceAtlas2Layout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new ForceAtlas2Layout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * Atlas2 力导向布局 + * + * Force Atlas 2 layout */ export class ForceAtlas2Layout implements Layout { id = 'forceAtlas2'; diff --git a/packages/layout/src/forceAtlas2/quadTree.ts b/packages/layout/src/force-atlas2/quad-tree.ts similarity index 100% rename from packages/layout/src/forceAtlas2/quadTree.ts rename to packages/layout/src/force-atlas2/quad-tree.ts diff --git a/packages/layout/src/forceAtlas2/quad.ts b/packages/layout/src/force-atlas2/quad.ts similarity index 100% rename from packages/layout/src/forceAtlas2/quad.ts rename to packages/layout/src/force-atlas2/quad.ts diff --git a/packages/layout/src/force/forceNBody.ts b/packages/layout/src/force/force-n-body.ts similarity index 100% rename from packages/layout/src/force/forceNBody.ts rename to packages/layout/src/force/force-n-body.ts diff --git a/packages/layout/src/force/index.ts b/packages/layout/src/force/index.ts index fb9e9ed..839ae4e 100644 --- a/packages/layout/src/force/index.ts +++ b/packages/layout/src/force/index.ts @@ -12,7 +12,7 @@ import type { Point, } from '../types'; import { formatNumberFn, isArray } from '../util'; -import { forceNBody } from './forceNBody'; +import { forceNBody } from './force-n-body'; import { CalcEdge, CalcEdgeData, @@ -41,19 +41,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout with faster force - * - * @example - * // Assign layout options when initialization. - * const layout = new ForceLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new ForceLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * 力导向布局 + * + * Force-directed layout */ export class ForceLayout implements LayoutWithIterations { id = 'force'; diff --git a/packages/layout/src/fruchterman.ts b/packages/layout/src/fruchterman.ts index 0ddff95..74e6584 100644 --- a/packages/layout/src/fruchterman.ts +++ b/packages/layout/src/fruchterman.ts @@ -53,19 +53,9 @@ interface FormattedOptions extends FruchtermanLayoutOptions { } /** - * Layout with fructherman force model - * - * @example - * // Assign layout options when initialization. - * const layout = new FruchtermanLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new FruchtermanLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * Fruchterman 力导向布局 + * + * Fruchterman force-directed layout */ export class FruchtermanLayout implements LayoutWithIterations diff --git a/packages/layout/src/grid.ts b/packages/layout/src/grid.ts index c7e8806..5da9034 100644 --- a/packages/layout/src/grid.ts +++ b/packages/layout/src/grid.ts @@ -45,19 +45,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes in a grid. - * - * @example - * // Assign layout options when initialization. - * const layout = new GridLayout({ rows: 10 }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new GridLayout({ rows: 10 }); - * const positions = await layout.execute(graph, { rows: 20 }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { rows: 20 }); + * 网格布局 + * + * Grid layout */ export class GridLayout implements Layout { id = 'grid'; diff --git a/packages/layout/src/mds.ts b/packages/layout/src/mds.ts index 496482e..c6c3337 100644 --- a/packages/layout/src/mds.ts +++ b/packages/layout/src/mds.ts @@ -22,19 +22,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes with multiple dimensional scaling algorithm + * 多维缩放算法布局 * - * @example - * // Assign layout options when initialization. - * const layout = new MDSLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new MDSLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { rows: 20 }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * Multidimensional scaling layout */ export class MDSLayout implements Layout { id = 'mds'; @@ -56,7 +46,7 @@ export class MDSLayout implements Layout { * To directly assign the positions to the nodes. */ async assign(graph: Graph, options?: MDSLayoutOptions) { - await this.genericMDSLayout(true, graph, options); + await this.genericMDSLayout(true, graph, options); } private async genericMDSLayout( diff --git a/packages/layout/src/radial/index.ts b/packages/layout/src/radial/index.ts index a3d83dc..237c4f5 100644 --- a/packages/layout/src/radial/index.ts +++ b/packages/layout/src/radial/index.ts @@ -36,19 +36,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout arranging the nodes' on a radial shape - * - * @example - * // Assign layout options when initialization. - * const layout = new RadialLayout({ focusNode: 'node0' }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new RadialLayout({ focusNode: 'node0' }); - * const positions = await layout.execute(graph, { focusNode: 'node0' }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { focusNode: 'node0' }); + * 径向布局 + * + * Radial layout */ export class RadialLayout implements Layout { id = 'radial'; diff --git a/packages/layout/src/random.ts b/packages/layout/src/random.ts index 450d9cd..5d0f581 100644 --- a/packages/layout/src/random.ts +++ b/packages/layout/src/random.ts @@ -14,19 +14,9 @@ const DEFAULTS_LAYOUT_OPTIONS: Partial = { }; /** - * Layout randomizing the nodes' position - * - * @example - * // Assign layout options when initialization. - * const layout = new RandomLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph); // { nodes: [], edges: [] } - * - * // Or use different options later. - * const layout = new RandomLayout({ center: [100, 100] }); - * const positions = await layout.execute(graph, { center: [100, 100] }); // { nodes: [], edges: [] } - * - * // If you want to assign the positions directly to the nodes, use assign method. - * await layout.assign(graph, { center: [100, 100] }); + * 随机布局 + * + * Random layout */ export class RandomLayout implements Layout { id = 'random'; diff --git a/packages/layout/src/registry.ts b/packages/layout/src/registry.ts index 5e4b090..66a64c4 100644 --- a/packages/layout/src/registry.ts +++ b/packages/layout/src/registry.ts @@ -1,12 +1,12 @@ import { AntVDagreLayout } from './antv-dagre'; import { CircularLayout } from './circular'; -import { ComboCombinedLayout } from './comboCombined'; +import { ComboCombinedLayout } from './combo-combined'; import { ConcentricLayout } from './concentric'; import { D3ForceLayout } from './d3-force'; import { D3Force3DLayout } from './d3-force-3d'; import { DagreLayout } from './dagre'; import { ForceLayout } from './force'; -import { ForceAtlas2Layout } from './forceAtlas2'; +import { ForceAtlas2Layout } from './force-atlas2'; import { FruchtermanLayout } from './fruchterman'; import { GridLayout } from './grid'; import { MDSLayout } from './mds'; diff --git a/packages/layout/src/types.ts b/packages/layout/src/types.ts index 7137f6f..c6ea6af 100644 --- a/packages/layout/src/types.ts +++ b/packages/layout/src/types.ts @@ -161,28 +161,28 @@ export interface CircularLayoutOptions { * 若设置了 radius,则 startRadius 与 endRadius 不生效 * * If radius is set, startRadius and endRadius will not take effect - * @defaultVaule null + * @defaultValue null */ radius?: number | null; /** * 螺旋状布局的起始半径 * * Spiral layout start radius - * @defaultVaule null + * @defaultValue null */ startRadius?: number | null; /** * 螺旋状布局的结束半径 * * Spiral layout end radius - * @defaultVaule null + * @defaultValue null */ endRadius?: number | null; /** * 是否顺时针排列 * * Whether to arrange clockwise - * @defaultVaule true + * @defaultValue true */ clockwise?: boolean; /** @@ -193,7 +193,7 @@ export interface CircularLayoutOptions { * 在 endRadius - startRadius != 0 时生效 * * It takes effect when endRadius - startRadius != 0 - * @defaultVaule 1 + * @defaultValue 1 */ divisions?: number; /** @@ -207,14 +207,14 @@ export interface CircularLayoutOptions { * - 'topology': Sort according to topological order * - 'topology-directed': Sort according to topological order (directed graph) * - 'degree': Sort according to degree size - * @defaultVaule null + * @defaultValue null */ ordering?: 'topology' | 'topology-directed' | 'degree' | null; /** * 从第一个节点到最后节点之间相隔多少个 2*PI * * The distance between the first node and the last node is separated by how many 2*PI - * @defaultVaule 1 + * @defaultValue 1 */ angleRatio?: number; /** @@ -252,7 +252,7 @@ export interface GridLayoutOptions { * 在 G6 中使用当前容器的宽度作为 grid 布局 width 的默认值。单独使用此布局时默认值为 300 * * The width of the grid layout is the default value of the current container width in G6. The default value is 300 when this layout is used alone - * @defaultVaule 300 + * @defaultValue 300 */ width?: number; /** @@ -263,14 +263,14 @@ export interface GridLayoutOptions { * 在 G6 中使用当前容器的高度作为 grid 布局 height 的默认值。单独使用此布局时默认值为 300 * * The height of the grid layout is the default value of the current container height in G6. The default value is 300 when this layout is used alone - * @defaultVaule 300 + * @defaultValue 300 */ height?: number; /** * 网格开始位置(左上角) * * Grid layout starting position (upper left corner) - * @defaultVaule [0, 0] + * @defaultValue [0, 0] * */ begin?: PointTuple; @@ -282,7 +282,7 @@ export interface GridLayoutOptions { * 必须配合下面属性 nodeSize 或节点数据中的 data.size 属性,只有在数据中设置了 data.size 或在该布局中配置了与当前图节点大小相同的 nodeSize 值,才能够进行节点重叠的碰撞检测 * * Must be used with the following properties: nodeSize or data.size in the data. When data.size is set or nodeSize is configured with the same value as the current graph node size in the layout, the collision detection of node overlap can be performed - * @defaultVaule false + * @defaultValue false */ preventOverlap?: boolean; /** @@ -295,42 +295,42 @@ export interface GridLayoutOptions { * 避免重叠时节点的间距 padding。preventOverlap 为 true 时生效 * * Padding between nodes to prevent overlap. It takes effect when preventOverlap is true - * @defaultVaule 10 + * @defaultValue 10 */ preventOverlapPadding?: number; /** * 为 false 时表示利用所有可用画布空间,为 true 时表示利用最小的画布空间 * * When false, it means to use all available canvas space. When true, it means to use the smallest canvas space - * @defaultVaule false + * @defaultValue false */ condense?: boolean; /** * 网格的行数,为 undefined 时算法根据节点数量、布局空间、cols(若指定)自动计算 * * Number of rows in the grid. It is calculated automatically when it is undefined and the number of nodes, layout space, and cols (if specified) are specified - * @defaultVaule 10 + * @defaultValue 10 */ rows?: number; /** * 网格的列数,为 undefined 时算法根据节点数量、布局空间、rows(若指定)自动计算 * * Number of columns in the grid. It is calculated automatically when it is undefined and the number of nodes, layout space, and rows (if specified) are specified - * @defaultVaule undefined + * @defaultValue undefined */ cols?: number; /** * 指定排序的依据(节点属性名),数值越高则该节点被放置得越中心。若为 undefined,则会计算节点的度数,度数越高,节点将被放置得越中心 * * Specify the basis for sorting (node attribute name). The higher the value, the more the node will be placed in the center. If it is undefined, the degree of the node will be calculated, and the higher the degree, the more the node will be placed in the center - * @defaultVaule undefined + * @defaultValue undefined */ sortBy?: string; /** * 指定每个节点所在的行和列 * * Specify the row and column where each node is located - * @defaultVaule undefined + * @defaultValue undefined */ position?: (node?: Node) => { row?: number; col?: number }; /** @@ -383,7 +383,7 @@ export interface MDSLayoutOptions { * 边的理想长度,可以理解为边作为弹簧在不受力下的长度 * * Ideal length of the edge, which can be understood as the length of the edge as a spring under no force - * @defaultVaule 200 + * @defaultValue 200 */ linkDistance?: number; } @@ -408,7 +408,7 @@ export interface ConcentricLayoutOptions { * 必须配合下面属性 nodeSize 或节点数据中的 data.size 属性,只有在数据中设置了 data.size 或在该布局中配置了与当前图节点大小相同的 nodeSize 值,才能够进行节点重叠的碰撞检测 * * Must be used with the following properties, and only when the data.size property is set in the data or the nodeSize value configured with the same size as the current graph node is configured in the layout, can the node overlap collision detection be performed - * @defaultVaule false + * @defaultValue false */ preventOverlap?: boolean; /** @@ -425,28 +425,28 @@ export interface ConcentricLayoutOptions { * 若为 undefined ,则将会被设置为 2 * Math.PI * (1 - 1 / |level.nodes|) ,其中 level.nodes 为该算法计算出的每一层的节点,|level.nodes| 代表该层节点数量 * * If undefined, it will be set to 2 * Math.PI * (1 - 1 / |level.nodes|), where level.nodes is the number of nodes in each layer calculated by this algorithm, and |level.nodes| represents the number of nodes in this layer - * @defaultVaule undefined + * @defaultValue undefined */ sweep?: number; /** * 环与环之间的距离是否相等 * * Whether the distance between rings is equal - * @defaultVaule false + * @defaultValue false */ equidistant?: boolean; /** * 开始布局节点的弧度 * * The starting angle of the layout node - * @defaultVaule 3 / 2 * Math.PI + * @defaultValue 3 / 2 * Math.PI */ startAngle?: number; /** * 是否按照顺时针排列 * * Whether to arrange in clockwise order - * @defaultVaule false + * @defaultValue false */ clockwise?: boolean; /** @@ -457,7 +457,7 @@ export interface ConcentricLayoutOptions { * 若为 undefined,则将会被设置为 maxValue / 4 ,其中 maxValue 为最大的排序依据的属性值。例如,若 sortBy 为 'degree',则 maxValue 为所有节点中度数最大的节点的度数 * * If undefined, it will be set to maxValue / 4, where maxValue is the largest value of the sortBy attribute. For example, if sortBy is 'degree', maxValue is the degree of the node with the largest degree in all nodes - * @defaultVaule undefined + * @defaultValue undefined */ maxLevelDiff?: number; /** @@ -468,7 +468,7 @@ export interface ConcentricLayoutOptions { * 数值越高则该节点被放置得越中心。若为 undefined,则会计算节点的度数,度数越高,节点将被放置得越中心 * * The higher the value, the more the node will be placed in the center. If undefined, the degree of the node will be calculated, and the higher the degree, the more the node will be placed in the center - * @defaultVaule undefined + * @defaultValue undefined */ sortBy?: string; /** @@ -487,7 +487,7 @@ export interface ConcentricLayoutOptions { * 环与环之间最小间距,用于调整半径 * * Minimum spacing between rings, used to adjust the radius - * @defaultVaule 10 + * @defaultValue 10 */ nodeSpacing?: number | number[] | ((node?: Node) => number); } @@ -520,14 +520,14 @@ export interface RadialLayoutOptions { * 边长度 * * Edge length - * @defaultVaule 50 + * @defaultValue 50 */ linkDistance?: number; /** * 停止迭代到最大迭代数 * * Stop iterating until the maximum iteration number is reached - * @defaultVaule 1000 + * @defaultValue 1000 */ maxIteration?: number; /** @@ -545,7 +545,7 @@ export interface RadialLayoutOptions { * 每一圈距离上一圈的距离。默认填充整个画布,即根据图的大小决定 * * The distance between each ring. Defaults to filling the entire canvas, i.e., determined by the size of the graph - * @defaultVaule 100 + * @defaultValue 100 */ unitRadius?: number | null; /** @@ -556,7 +556,7 @@ export interface RadialLayoutOptions { * 必须配合下面属性 nodeSize 或节点数据中的 data.size 属性,只有在数据中设置了 data.size 或在该布局中配置了与当前图节点大小相同的 nodeSize 值,才能够进行节点重叠的碰撞检测 * * Must be used with the following properties: nodeSize or data.size in the node data. Only when data.size or nodeSize with the same value as the current graph node size is set in the layout configuration, can the collision detection of node overlap be performed - * @defaultVaule false + * @defaultValue false */ preventOverlap?: boolean; /** @@ -569,14 +569,14 @@ export interface RadialLayoutOptions { * preventOverlap 为 true 时生效, 防止重叠时节点边缘间距的最小值。可以是回调函数, 为不同节点设置不同的最小间距 * * Effective when preventOverlap is true. The minimum edge spacing when preventing node overlap. It can be a callback function, and set different minimum spacing for different nodes - * @defaultVaule 10 + * @defaultValue 10 */ nodeSpacing?: number | Function; /** * 防止重叠步骤的最大迭代次数 * * Maximum iteration number of the prevent overlap step - * @defaultVaule 200 + * @defaultValue 200 */ maxPreventOverlapIteration?: number; /** @@ -587,7 +587,7 @@ export interface RadialLayoutOptions { * 当 preventOverlap 为 true,且 strictRadial 为 false 时,有重叠的节点严格沿着所在的环展开,但在一个环上若节点过多,可能无法完全避免节点重叠 当 preventOverlap 为 true,且 strictRadial 为 true 时,允许同环上重叠的节点不严格沿着该环布局,可以在该环的前后偏移以避免重叠 * * When preventOverlap is true and strictRadial is false, overlapping nodes are strictly laid out along the ring they are in. However, if there are too many nodes on a ring, it may not be possible to completely avoid node overlap. When preventOverlap is true and strictRadial is true, overlapping nodes on the same ring are allowed to be laid out not strictly along the ring, and can be offset before and after the ring to avoid overlap - * @defaultVaule true + * @defaultValue true */ strictRadial?: boolean; /** @@ -598,14 +598,14 @@ export interface RadialLayoutOptions { * 默认 undefined ,表示根据数据的拓扑结构(节点间最短路径)排布,即关系越近/点对间最短路径越小的节点将会被尽可能排列在一起;'data' 表示按照节点在数据中的顺序排列,即在数据顺序上靠近的节点将会尽可能排列在一起;也可以指定为节点数据中的某个字段名,例如 'cluster'、'name' 等(必须在数据的 data 中存在) * * The default is undefined, which means arranging based on the topological structure of the data (the shortest path between nodes). Nodes that are closer in proximity or have a smaller shortest path between them will be arranged as close together as possible. 'data' indicates arranging based on the order of nodes in the data, so nodes that are closer in the data order will be arranged as close together as possible. You can also specify a field name in the node data, such as 'cluster' or 'name' (it must exist in the data of the graph) - * @defaultVaule undefined + * @defaultValue undefined */ sortBy?: string; /** * 同层节点根据 sortBy 排列的强度,数值越大,sortBy 指定的方式计算出距离越小的越靠近。sortBy 不为 undefined 时生效 * * The strength of arranging nodes according to sortBy. The larger the value, the closer the nodes that sortBy specifies are arranged. It takes effect when sortBy is not undefined - * @defaultVaule 10 + * @defaultValue 10 */ sortStrength?: number; } @@ -629,7 +629,7 @@ export interface D3ForceLayoutOptions { * Edge length * - number: fixed edge length * - (edge: Edge) => number: edge length callback function, set different edge lengths according to different edges - * @defaultVaule 50 + * @defaultValue 50 */ linkDistance?: number | ((edge?: Edge) => number); /** @@ -648,7 +648,7 @@ export interface D3ForceLayoutOptions { * Cluster node strength. Negative numbers represent repulsion * - number: fixed cluster node strength * - (node: Node) => number: cluster node strength callback function, set different cluster node strengths according to different nodes - * @defaultVaule -1 + * @defaultValue -1 */ nodeStrength?: number | ((node?: Node) => number); /** @@ -659,14 +659,14 @@ export interface D3ForceLayoutOptions { * 必须配合下面属性 nodeSize 或节点数据中的 data.size 属性,只有在数据中设置了 data.size 或在该布局中配置了与当前图节点大小相同的 nodeSize 值,才能够进行节点重叠的碰撞检测 * * Must be used with the following properties: nodeSize or data.size in the node data. Only when data.size or nodeSize with the same value as the current graph node size is set in the layout configuration, can the collision detection of node overlapping be performed - * @defaultVaule false + * @defaultValue false */ preventOverlap?: boolean; /** * 防止重叠的力强度,范围 [0, 1] * * The force strength of preventing overlap, the range is [0, 1] - * @defaultVaule 1 + * @defaultValue 1 */ collideStrength?: number; /** @@ -685,63 +685,63 @@ export interface D3ForceLayoutOptions { * 当前的迭代收敛阈值 * * The convergence threshold of the current iteration - * @defaultVaule 0.3 + * @defaultValue 0.3 */ alpha?: number; /** * 迭代阈值的衰减率。范围 [0, 1]。0.028 对应迭代数为 300 * * The decay rate of the iteration threshold. The range is [0, 1]. 0.028 corresponds to iteration number 300 - * @defaultVaule 0.028 + * @defaultValue 0.028 */ alphaDecay?: number; /** * 停止迭代的阈值 * * The threshold to stop iteration - * @defaultVaule 0.001 + * @defaultValue 0.001 */ alphaMin?: number; /** * 是否按照聚类信息布局 * * Whether to layout according to the clustering information - * @defaultVaule false + * @defaultValue false */ clustering?: boolean; /** * 聚类节点作用力。负数代表斥力 * * Clustering node force. Negative numbers represent repulsion - * @defaultVaule -1 + * @defaultValue -1 */ clusterNodeStrength?: number; /** * 聚类边作用力 * * Clustering edge force - * @defaultVaule 0.1 + * @defaultValue 0.1 */ clusterEdgeStrength?: number; /** * 聚类边长度 * * Clustering edge length - * @defaultVaule 100 + * @defaultValue 100 */ clusterEdgeDistance?: number; /** * 聚类节点大小 / 直径,直径越大,越分散 * * Clustering node size / diameter. Diameter larger means more scattered - * @defaultVaule 10 + * @defaultValue 10 */ clusterNodeSize?: number; /** * 用于 foci 的力 * * Force for foci - * @defaultVaule 0.8 + * @defaultValue 0.8 */ clusterFociStrength?: number; /** @@ -772,7 +772,7 @@ export interface CentripetalOptions { * The centripetal force of the leaf node (i.e., the node with degree 1) * - number: fixed centripetal force size * - ((node: Node, nodes: Node[], edges: Edge[]) => number): return different values according to the node, edge, and situation - * @defaultVaule 2 + * @defaultValue 2 */ leaf?: number | ((node: Node, nodes: Node[], edges: Edge[]) => number); /** @@ -782,7 +782,7 @@ export interface CentripetalOptions { * The centripetal force of the scattered node (i.e., the node with degree 0) * - number: fixed centripetal force size * - ((node: Node) => number): return different values according to the node situation - * @defaultVaule 2 + * @defaultValue 2 */ single?: number | ((node: Node) => number); /** @@ -792,7 +792,7 @@ export interface CentripetalOptions { * The centripetal force of the other nodes (i.e., the node with degree > 1) * - number: fixed centripetal force size * - ((node: Node) => number): return different values according to the node situation - * @defaultVaule 1 + * @defaultValue 1 */ others?: number | ((node: Node) => number); /** @@ -834,7 +834,7 @@ export interface ComboCombinedLayoutOptions { * 若不指定,则根据传入的节点的 size 属性计算。若即不指定,节点中也没有 size,则默认大小为 10 * * If not specified, it will be calculated based on the size attribute of the incoming node. If neither is specified, the default size is 10 - * @defaultVaule 10 + * @defaultValue 10 */ nodeSize?: number | number[] | ((d?: Node) => number); /** @@ -860,7 +860,7 @@ export interface ComboCombinedLayoutOptions { * } * }); * ``` - * @defaultVaule ForceLayout + * @defaultValue ForceLayout */ outerLayout?: Layout; /** @@ -875,14 +875,14 @@ export interface ComboCombinedLayoutOptions { * sortBy: 'id' * }); * ``` - * @defaultVaule ConcentricLayout + * @defaultValue ConcentricLayout */ innerLayout?: Layout; /** * Combo 内部的 padding 值,不用于渲染,仅用于计算力。推荐设置为与视图上 combo 内部 padding 值相同的值 * * The padding value inside the combo, which is not used for rendering, but only for calculating force. It is recommended to set it to the same value as the combo internal padding value on the view - * @defaultVaule 10 + * @defaultValue 10 */ comboPadding?: ((d?: unknown) => number) | number | number[] | undefined; /** @@ -903,7 +903,7 @@ interface CommonForceLayoutOptions { * 布局的维度,2D 渲染时指定为 2;若为 3D 渲染可指定为 3,则将多计算 z 轴的布局 * * The dimensions of the layout, specify 2 for 2D rendering; if it is 3D rendering, specify 3 to calculate the layout of the z axis - * @defaultVaule 2 + * @defaultValue 2 */ dimensions?: number; /** @@ -916,14 +916,14 @@ interface CommonForceLayoutOptions { * 当一次迭代的平均/最大/最小(根据distanceThresholdMode决定)移动长度小于该值时停止迭代。数字越小,布局越收敛,所用时间将越长 * * When the average/max/min (depending on distanceThresholdMode) movement length of one iteration is less than this value, the iteration will stop. The smaller the number, the more converged the layout, and the longer the time it takes to use - * @defaultVaule 0.4 + * @defaultValue 0.4 */ minMovement?: number; /** * 最大迭代次数,若为 0 则将自动调整 * * Maximum number of iterations, if it is 0, it will be automatically adjusted - * @defaultVaule 0 + * @defaultValue 0 */ maxIteration?: number; /** @@ -935,7 +935,7 @@ interface CommonForceLayoutOptions { * - 'mean': The average movement distance is less than minMovement when stopped iterating * - 'max': The maximum movement distance is less than minMovement when stopped iterating * - 'min': The minimum movement distance is less than minMovement when stopped iterating - * @defaultVaule 'mean' + * @defaultValue 'mean' */ distanceThresholdMode?: 'mean' | 'max' | 'min'; /** @@ -966,28 +966,28 @@ export interface ForceLayoutOptions extends CommonForceLayoutOptions { * The length of the edge * - number: fixed length * - ((edge?: Edge, source?: any, target?: any) => number): return length according to the edge information - * @defaultVaule 200 + * @defaultValue 200 */ linkDistance?: number | ((edge?: Edge, source?: any, target?: any) => number); /** * 节点作用力,正数代表节点之间的引力作用,负数代表节点之间的斥力作用 * * The force of the node, positive numbers represent the attraction force between nodes, and negative numbers represent the repulsion force between nodes - * @defaultVaule 1000 + * @defaultValue 1000 */ nodeStrength?: number | ((d?: Node) => number); /** * 边的作用力(引力)大小 * * The size of the force of the edge (attraction) - * @defaultVaule 50 + * @defaultValue 50 */ edgeStrength?: number | ((d?: Edge) => number); /** * 是否防止重叠,必须配合下面属性 nodeSize 或节点数据中的 data.size 属性,只有在数据中设置了 data.size 或在该布局中配置了与当前图节点大小相同的 nodeSize 值,才能够进行节点重叠的碰撞检测 * * Whether to prevent overlap, must be used with the following properties nodeSize or data.size in the node data, and only when the data.size is set in the data or the nodeSize value is configured with the same value as the current graph node size in the layout configuration, can the node overlap collision detection be performed - * @defaultVaule true + * @defaultValue true */ preventOverlap?: boolean; /** @@ -1006,42 +1006,42 @@ export interface ForceLayoutOptions extends CommonForceLayoutOptions { * 阻尼系数,取值范围 [0, 1]。数字越大,速度降低得越慢 * * Damping coefficient, the range of the value is [0, 1]. The larger the number, the slower the speed will decrease - * @defaultVaule 0.9 + * @defaultValue 0.9 */ damping?: number; /** * 一次迭代的最大移动长度 * * The maximum movement length of one iteration - * @defaultVaule 200 + * @defaultValue 200 */ maxSpeed?: number; /** * 库伦系数,斥力的一个系数,数字越大,节点之间的斥力越大 * * Coulomb's coefficient, a coefficient of repulsion, the larger the number, the larger the repulsion between nodes - * @defaultVaule 0.005 + * @defaultValue 0.005 */ coulombDisScale?: number; /** * 中心力大小,指所有节点被吸引到 center 的力。数字越大,布局越紧凑 * * The size of the center force, which attracts all nodes to the center. The larger the number, the more compact the layout - * @defaultVaule 10 + * @defaultValue 10 */ gravity?: number; /** * 斥力系数,数值越大,斥力越大 * * The repulsion coefficient, the larger the number, the larger the repulsion - * @defaultVaule 1 + * @defaultValue 1 */ factor?: number; /** * 控制每个迭代节点的移动速度 * * Control the movement speed of each iteration node - * @defaultVaule 0.02 + * @defaultValue 0.02 */ interval?: number; /** @@ -1058,7 +1058,7 @@ export interface ForceLayoutOptions extends CommonForceLayoutOptions { * 若为 true,则 centripetalOptions.single 将为 100;centripetalOptions.leaf 将使用 getClusterNodeStrength 返回值;getClusterNodeStrength.center 将为叶子节点返回当前所有叶子节点的平均中心 * * If it is true, centripetalOptions.single will be 100; centripetalOptions.leaf will use the return value of getClusterNodeStrength; getClusterNodeStrength.center will be the average center of all leaf nodes - * @defaultVaule false + * @defaultValue false */ leafCluster?: boolean; /** @@ -1069,7 +1069,7 @@ export interface ForceLayoutOptions extends CommonForceLayoutOptions { * 若为 true,将使用 nodeClusterBy 配置的节点数据中的字段作为聚类依据。 centripetalOptions.single、centripetalOptions.leaf、centripetalOptions.others 将使用 getClusterNodeStrength 返回值;leaf、centripetalOptions.center 将使用当前节点所属聚类中所有节点的平均中心 * * If it is true, the node data configured by nodeClusterBy will be used as the clustering basis. centripetalOptions.single, centripetalOptions.leaf, centripetalOptions.others will use the return value of getClusterNodeStrength; leaf、centripetalOptions.center will use the average center of all nodes in the current cluster - * @defaultVaule false + * @defaultValue false */ clustering?: boolean; /** @@ -1082,14 +1082,14 @@ export interface ForceLayoutOptions extends CommonForceLayoutOptions { * 配合 clustering 和 nodeClusterBy 使用,指定聚类向心力的大小 * * Use it with clustering and nodeClusterBy to specify the size of the centripetal force of the cluster - * @defaultVaule 20 + * @defaultValue 20 */ clusterNodeStrength?: number | ((node: Node) => number); /** * 防止重叠的力强度,范围 [0, 1] * * The strength of the force that prevents overlap, range [0, 1] - * @defaultVaule 1 + * @defaultValue 1 */ collideStrength?: number; /** @@ -1152,35 +1152,35 @@ export interface ForceAtlas2LayoutOptions extends CommonForceLayoutOptions { * 斥力系数,可用于调整布局的紧凑程度。kr 越大,布局越松散 * * The repulsive coefficient, which can be used to adjust the compactness of the layout. The larger kr is, the more relaxed the layout is - * @defaultVaule 5 + * @defaultValue 5 */ kr?: number; /** * 重力系数。kg 越大,布局越聚集在中心 * * The gravitational coefficient. The larger kg is, the more clustered the layout is in the center - * @defaultVaule 1 + * @defaultValue 1 */ kg?: number; /** * 控制迭代过程中,节点移动的速度 * * Control the speed of node movement during iteration - * @defaultVaule 0.1 + * @defaultValue 0.1 */ ks?: number; /** * 迭代过程中,最大的节点移动的速度上限 * * The upper limit of the maximum node movement speed during iteration - * @defaultVaule 10 + * @defaultValue 10 */ ksmax?: number; /** * 迭代接近收敛时停止震荡的容忍度 * * The tolerance for stopping oscillation when iteration is close to convergence - * @defaultVaule 0.1 + * @defaultValue 0.1 */ tao?: number; /** @@ -1190,7 +1190,7 @@ export interface ForceAtlas2LayoutOptions extends CommonForceLayoutOptions { * Clustering mode, the clustering will be more compact in the 'linlog' mode * - 'normal':normal mode * - 'linlog':linlog mode - * @defaultVaule 'normal' + * @defaultValue 'normal' */ mode?: 'normal' | 'linlog'; /** @@ -1201,14 +1201,14 @@ export interface ForceAtlas2LayoutOptions extends CommonForceLayoutOptions { * 必须配合下面属性 nodeSize 或节点数据中的 data.size 属性,只有在数据中设置了 data.size 或在该布局中配置了与当前图节点大小相同的 nodeSize 值,才能够进行节点重叠的碰撞检测 * * Must be used with the following properties: nodeSize or data.size in the node data. Only when data.size or nodeSize with the same value as the current graph node size is set in the layout configuration, can the collision detection of node overlap be performed - * @defaultVaule false + * @defaultValue false */ preventOverlap?: boolean; /** * 是否打开 hub 模式。若为 true,相比与出度大的节点,入度大的节点将会有更高的优先级被放置在中心位置 * * Whether to open the hub mode. If true, nodes with high out-degree will have higher priority than nodes with high in-degree to be placed in the center - * @defaultVaule false + * @defaultValue false */ dissuadeHubs?: boolean; /** @@ -1268,35 +1268,35 @@ export interface FruchtermanLayoutOptions extends CommonForceLayoutOptions { * 中心力大小,指所有节点被吸引到 center 的力。数字越大,布局越紧凑 * * The size of the center force, which means the force that all nodes are attracted to the center. The larger the number, the more compact the layout - * @defaultVaule 10 + * @defaultValue 10 */ gravity?: number; /** * 每次迭代节点移动的速度。速度太快可能会导致强烈震荡 * * The speed at which the node moves in each iteration. A speed that is too fast may cause strong oscillations - * @defaultVaule 5 + * @defaultValue 5 */ speed?: number; /** * 是否按照聚类布局 * * Whether to layout according to clustering - * @defaultVaule false + * @defaultValue false */ clustering?: boolean; /** * 聚类内部的重力大小,影响聚类的紧凑程度,在 clustering 为 true 时生效 * * The size of the gravity inside the cluster, which affects the compactness of the cluster, and it takes effect when clustering is true - * @defaultVaule 10 + * @defaultValue 10 */ clusterGravity?: number; /** * 聚类布局依据的节点数据 data 中的字段名,cluster: true 时使用 * * The field name of the node data data in the data, which is used when cluster is true - * @defaultVaule 'cluster' + * @defaultValue 'cluster' */ nodeClusterBy?: string; /**