import * as d3 from 'd3'; import { IBaseGraphData, IBaseOptions } from './force-graph.types'; import { Subject } from 'rxjs'; export declare class Node implements d3.SimulationNodeDatum { index?: number; x?: number; y?: number; vx?: number; vy?: number; id?: number | string; fx?: number | null; fy?: number | null; [key: string]: any; } export declare class Link implements d3.SimulationLinkDatum { source: Node | string | number; target: Node | string | number; index?: number | undefined; [key: string]: any; constructor(source: Node | string | number, target: Node | string | number); } export declare class ForceGraph { simulation: d3.Simulation; tick$: Subject; data: IBaseGraphData; requested: any; options: IBaseOptions; constructor(); get nodes(): Node[]; set nodes(nodes: Node[]); get links(): Link[]; set links(links: Link[]); private onTick; render(self: any): any; /** * 设置力导向布局基础属性 * @params options config 配置 */ setOptions(options: IBaseOptions): void; /** * 配置simulation * @params options config 配置 */ setForces(options: IBaseOptions): void; /** * 加载力模型布局 * @params data 图数据 * @params options config配置 */ load(data: IBaseGraphData, options: IBaseOptions): void; }