der Code erstellt eine Strecke und auch das mit dem Drehen klappt prima:
Code: Alles auswählen
<g id="strecke">
<line x1={{grafik.x1}} y1={{grafik.y1}} x2={{grafik.x2}} y2={{grafik.y2}} style="stroke:black;stroke-width:2;"/>
<line x1={{grafik.x1}} y1={{grafik.y1|add:10}} x2={{grafik.x1}} y2={{grafik.y1|add:-10}} style="stroke:black;stroke-width:2;" />
<line x1={{grafik.x2}} y1={{grafik.y1|add:10}} x2={{grafik.x2}} y2={{grafik.y1|add:-10}} style="stroke:black;stroke-width:2;" />
</g>
<use href="#strecke" transform="rotate(20,200,100)" />