g6/packages/site/docs/apis/modules/graph.zh.md
2023-08-31 23:46:08 +08:00

6.0 KiB

title
graph

📋 中文文档还在翻译中... 欢迎 PR

Overview - v5.0.0-beta.2 / Modules / graph

Interfaces

Classes

Variables

Util

Const Util: Object

Type declaration

Name Type
extend <B1, B2, T1, T2>(GraphClass: typeof Graph, extendLibrary: { behaviors?: B1 ; edges?: EdgeRegistry ; layouts?: LayoutRegistry ; nodes?: NodeRegistry ; plugins?: PluginRegistry ; themeSolvers?: T1 }) => typeof Graph
getArrowPath (type: ArrowType, width: number, height: number) => string
getEdgesBetween (graph: IGraph<BehaviorRegistry, ThemeRegistry>, ids: ID[]) => ID[]
graphComboTreeDfs (graph: IGraph<BehaviorRegistry, ThemeRegistry>, nodes: NodeUserModel[], fn: any, mode: "TB" | "BT") => void
graphCoreTreeDfs (graphCore: GraphCore, nodes: NodeUserModel[], fn: any, mode: "TB" | "BT", treeKey: string, stopFns: { stopAllFn?: (node: NodeUserModel) => boolean ; stopBranchFn?: (node: NodeUserModel) => boolean }) => void
graphData2TreeData (nodeMap: { [id: string]: any; }, graphData: GraphData, propRootIds: ID[]) => any[]
isEncode (value: any) => value is Encode<any>
isSucceed (graph: any, testParent: any, testSucceed: any) => boolean
mock (nodeCount: number) => { circle: (centerId: string) => { edges: any[] ; nodes: { data: {} = {}; id: string }[] } ; random: (ratio: number) => { edges: any[] ; nodes: { data: {} = {}; id: string }[] } }
traverse (treeData: any, callback: any) => void
traverseAncestors (graphCore: any, nodes: any, fn: any) => void
traverseAncestorsAndSucceeds (graph: IGraph<BehaviorRegistry, ThemeRegistry>, graphCore: GraphCore, nodes: NodeUserModel[], fn: any, mode: "TB" | "BT") => void
traverseGraphAncestors (graph: IGraph<BehaviorRegistry, ThemeRegistry>, nodes: NodeUserModel[], fn: any) => void
treeData2GraphData (treeData: TreeData<NodeUserModelData> | TreeData<NodeUserModelData>[]) => { combos: any[] = []; edges: any[] = []; nodes: any[] = [] }

Defined in

packages/g6/src/util/index.ts:18