title: How to get a circle position in a g element in SVG using D3.js
body: <p>I have a circle inside g element in the SVG. The g element can move simply according to the x-coordinates. The position of the g element can change as it moves. The circle also moves as it is in that g element. My question is how can I retrieve the position of that circle in the SVG NOT its position in g element? I tried the following code but could not get what I am expecting: <code>circleGroup.on("mouseover", function() 
          {
      var translate = d3.transform(d3.select(this).attr("transform")).translate;
      alert(translate[0].x);
          });</code></p>
  
  <p>May anyone assist me to retrieve the position of the circle in the SVG not in the g element, please? I need to get the position of the circle in order to draw a line starting from its position in the SVG not the g element where the circle is in. Your assistance would be very much appreciated. Here is: <a href="http://jsfiddle.net/mo_jsfiddle1/uo542s2e/" rel="nofollow">JsFiddle</a> </p>