I googled a lot of ways how to align set of tspan
by center, but I need something else. I need to align the set of tspan
elements by center and each element should be aligned by the left side with other elements.
On the picture below you can see what I'm trying to reach.
I tried to add one more tspan
element as a wrapper for other and set to it text-anchor: middle
, but it doesn't work.
For this I would use JavaScript to calculate the offset for the first
tspan
as half the difference of length between the twotspan
elements