Answer the question
In order to leave comments, you need to log in
How to make coordinates count from the center in svg?
I'm writing a script to build a donut chart and I'm having difficulty. I need to count the coordinate system from the center (that is, if I specify M0,0 L100,100 in path d, then the line should go from the center to 100px to the top). Now I have a countdown from the top left corner, how can I fix this?
Answer the question
In order to leave comments, you need to log in
I think that through the transformation of the coordinate system and the dimensions of the viewBox, I haven’t tried it myself, but if I dig, I think it will work.
https://htmlacademy.ru/courses/259/run/13 - here you can see about transformations.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question