I have an SVG map of India and I want to display a customized tooltip on mouseover like this https://www.amcharts.com/svg-maps/?map=india . I have downloaded SVG map from this website but I am not able to display a tooltip when mouse is hovered over the states. It would be great if the solution is given either using jquery or JS.
Asked
Active
Viewed 90 times
0
-
Why are you not able to? What tooltip do you want? Will a
child element not do? – Robert Longson Mar 13 '17 at 16:01 -
i want an custom tooltip moreover, Idk where to put that
tag. – Adarsh Chaudhary Mar 13 '17 at 16:07 -
Custom in what way? as I said you make it a child element of whatever you want it to appear on. – Robert Longson Mar 13 '17 at 16:09
-
tag is not a container tag. so should i put
inside or – Adarsh Chaudhary Mar 13 '17 at 16:16tag? -
where do I put title tag?. which tag should be the parent of
tag. this SVG contains a – Adarsh Chaudhary Mar 13 '17 at 16:21tag and all the states are inside that tag, the states are defined using path tags. -
The parent of the title tag would be the tag you want to display the tooltip on. In your case most likely you want a title tag as a child of each path tag. – Robert Longson Mar 13 '17 at 16:23
-
path tag is not an container tag. it cannot have child tag. – Adarsh Chaudhary Mar 13 '17 at 16:24
-
You're correct that it is not a container tag. You're wrong that it cannot have a title child tag. Why not stop arguing and just try it? – Robert Longson Mar 13 '17 at 16:35
-
Thanks I tried it and it worked. But now the problem is that I want to have a customised tooltip. – Adarsh Chaudhary Mar 14 '17 at 03:20
-
Which is why I asked what you meant by custom several comments ago. You'd need to roll your own for that. – Robert Longson Mar 14 '17 at 07:01
-
@Adarsh This is a common question that has many answers on S.O. Also a simple web search will return numerous approaches you could take. – Paul LeBeau Mar 14 '17 at 07:02