-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreact-graph-vis.d.ts
38 lines (32 loc) · 1 KB
/
react-graph-vis.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
declare module "react-graph-vis" {
import { Network, NetworkEvents, Options, Node, Edge, DataSet } from "vis";
import { Component } from "react";
export { Network, NetworkEvents, Options, Node, Edge, DataSet } from "vis";
export interface graphEvents {
[event: NetworkEvents]: (params?: any) => void;
}
//Doesn't appear that this module supports passing in a vis.DataSet directly. Once it does graph can just use the Data object from vis.
export interface graphData {
nodes: Node[];
edges: Edge[];
}
export interface NetworkGraphProps {
graph: graphData;
options?: Options;
events?: graphEvents;
getNetwork?: (network: Network) => void;
identifier?: string;
style?: React.CSSProperties;
getNodes?: (nodes: DataSet) => void;
getEdges?: (edges: DataSet) => void;
}
export interface NetworkGraphState {
identifier: string;
}
export default class NetworkGraph extends Component<
NetworkGraphProps,
NetworkGraphState
> {
render();
}
}