Answer the question
In order to leave comments, you need to log in
Map to svg, how to add text to an element?
You need to make a map like this.
It turns out that you need to draw regions, and add a label and text to them, I do it in svg because I need to dynamically change the color on hover and turn off some regions (delete text and label).
What are the options for how to build it? In svg, you can’t make nested elements, but I wanted to break everything into groups, region-> name + label + background of the region itself. Maybe there are better svg options?
Answer the question
In order to leave comments, you need to log in
You can't nest elements in svg
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question