/ / Faire pivoter le texte en SVG - xml, svg, rotation, scale, scaletransform

Faire pivoter le texte en SVG - xml, svg, rotation, échelle, scaletransform

J'ai un graphique avec svg qui ressemble à Graphique

Maintenant, je veux faire pivoter le texte comme Graphique

ma SVG root est le suivant

<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ev="http://www.w3.org/2001/xml-events"
version="1.1" baseProfile="full"
viewbox="-75 0 1075 800"
transform="translate(0, 750) scale(1, -1)"
width="1000" height="800">
</svg>

Si j'essaye de faire pivoter le texte avec

<text x="-70" y="50%" stroke="blue" transform="rotate(90)">U [mV]</text>

le texte disparaît.

Avec

<text x="-70" y="50%" stroke="blue" transform="rotate(90 -70 50%)">U [mV]</text>

Rien ne se passe.

Que dois-je faire pour faire pivoter les trois objets texte affichés dans la deuxième image? Merci.

Réponses:

0 pour la réponse № 1

Ce qui suit fonctionne pour moi maintenant:

<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ev="http://www.w3.org/2001/xml-events"
version="1.1" baseProfile="full"
viewbox="-75 0 1075 800"
width="1000" height="800">

<g transform="translate(0, 750) scale(1, -1)"> <!-- hint from @altocumulus -->
...

<g transform="translate(-75, 375) scale(1, -1) rotate(-90)">
<!--
translate(x, y) => create a new local coordination system
with the point of origin at this point
-->

<text stroke="blue">U [mV]</text>
</g>

...
</g>
</svg>