import * as d3Select from 'd3-selection'; export const generateDefs = node => { const defs = d3Select.select(node).append('defs'); defs.append('marker') .attr('id', 'arrow') .attr('viewBox', '0 -5 10 10') .attr('refX', 10) .attr('refY', 0) .attr('markerWidth', 4) .attr('markerHeight', 4) .attr('orient', 'auto') .attr('fill', '#a7aaae') .append('path') .attr('d', 'M0,-5L10,0L0,5') .attr('class', 'arrowHead'); return defs; };