Files
DefinitelyTyped/dagre-d3/dagre-d3-tests.ts
Andy 728bd4841d Remove package.json dependencies for @types/d3 when we can use path mapping instead. (#14102)
* And remove d3's `package.json` since it depends on the latest versions of its components.
2017-01-18 14:45:40 -08:00

23 lines
766 B
TypeScript

namespace DagreD3Tests {
const gDagre = new dagreD3.graphlib.Graph();
const graph = gDagre.graph();
// has graph methods from dagre.d.ts
graph.setNode("a", {});
const num: number = 251 + graph.height + graph.width;
const predecessors: { [vertex: string]: string[] } = {};
const successors: { [vertex: string]: string[] } = {};
predecessors["a"] = graph.predecessors("a");
successors["a"] = graph.successors("a");
graph.transition = (selection: d3.Selection<any>) => {
return d3.transition();
};
const render = new dagreD3.render();
const svg = d3.select("svg");
render.arrows()["arrowType"] = (parent: d3.Selection<any>, id: string, edge: dagre.Edge, type: string) => {};
render(svg, graph);
}