graphology-svg
Version:
SVG rendering routines for graphology.
27 lines (26 loc) • 473 B
JavaScript
/**
* Graphology SVG Edge Line Component
* ==================================
*
* Rendering nodes as plain lines.
*/
module.exports = function drawEdge(settings, data, sourceData, targetData) {
return (
'<line x1="' +
sourceData.x +
'" y1="' +
sourceData.y +
'" ' +
'x2="' +
targetData.x +
'" y2="' +
targetData.y +
'" ' +
'stroke="' +
data.color +
'" ' +
'stroke-width="' +
data.size +
'" />'
);
};