Edge Path Templates¶
The path of an Edge()
can be controlled by using an EdgePathGenerator()
together with the Edge.pathType
.
The EdgePathGenerator()
must be registered in the GraphEditor.edgePathGeneratorRegistry
before it can be referenced.
The curves defined by d3 can be used with the provided SmoothedEdgePathGenerator()
.
There is also the SteppedEdgePathGenerator()
.
Examples¶
// standard edge path generator
new SmoothedEdgePathGenerator(curveBasis, true, 10);
// linear edge path generator
new SmoothedEdgePathGenerator(curveLinear, false);
// linear edge path generator with offset points
new SmoothedEdgePathGenerator(curveLinear, true, 10);
// stepped edge path generator
new SteppedEdgePathGenerator();