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);
_images/curveBasis.png
// linear edge path generator
new SmoothedEdgePathGenerator(curveLinear, false);
_images/curveLinear.png
// linear edge path generator with offset points
new SmoothedEdgePathGenerator(curveLinear, true, 10);
_images/curveLinear-with-offset-points.png
// stepped edge path generator
new SteppedEdgePathGenerator();
_images/stepped-edge.png