force-graph-vis
Version:
基于D3.js的知识图谱可视化解决方案
35 lines (29 loc) • 713 B
TypeScript
export type anyFunction = (...params: any[]) => any;
export interface LooseObject {
[key: string]: any;
}
export interface GraphDataNode {
id: string;
color?: string;
radius?: number;
name?: string;
x?: number;
y?: number;
fx?: number;
fy?: number;
}
export interface GraphDataLink {
source: string | GraphDataNode;
target: string | GraphDataNode;
id?: string;
}
// export type node = GraphDataNode;
// export type link = GraphDataLink;
export interface GraphData {
[index: number]: {
nodes: GraphDataNode[];
links: GraphDataLink[];
};
}
export type injectValue = () => any | { [key: string]: any };
export type plugin = { [key: string]: any; install?: () => any } | any;