If you want to use mouse coordinates over an SVG element you need to use some code to convert screen coordinates to SVG coordinates. Here is an example of how to do it. Check the CTM transform checkbox to see it in action.
The pulse animation on the unselected checkbox is from another pen: https://codepen.io/olam/pen/zcqea
Source: Useful Pens for Everyday Front End Development