I need to make it flexible. It can be some type of lines and arrows on the end of lines.
So, I decided to create two SVG objects: lines and an arrowhead.
How to draw an arrowhead on the end or beginning of the line?
My line is:
<svg width="500" height="100">
<line x1="0" y1="80" x2="100" y2="20" stroke="black" />
</svg>
refX
to a smaller value: try 5 or 6. This will make the marker to go outside the svg canvas, so you'll need to also change the value of the viewBox toviewBox="0 0 110 100"
to make the svg wider