I’m attempting to make a two circle Venn Diagram that has utilizes an interactive SVG (clickable/etc), the inspiration is utilized from here: https://stackoverflow.com/a/29473362/4309550
My question is, how would you be able to get the long and complicated paths that are posted in the SVG element and would it be easy to get these paths without using a tool like illustrator (as I don’t have illustrator/photoshop?) I tried playing around with the path d values in the sample given in the posted stackoverflow page but did not have any success in doing so. Any help would be appreciated.
2
Answers
there’s a specific circle element in SVG with which you can easily make circles;
here’s a function for making SVG circles:
Actually the example you link to is made with distinct paths so to add animation on hover
edit:
the easiest workaround, that comes to my mind,for solving your problem is creating 2 circles and an overlapping double-arc to represent intersection:
fiddle
You can detect which section has been clicked on even with circles. This answer is expanded from maioman’s original with an alert which counts how many overlapping circles exist at the point in question.