I am using d3.js and using that I have created svg on which I have drawn maps and circle. There are many circles and each of them have unique id but same class. Now when I hover over them I want to do some transition by calling an oneevent function.
Here is the structure of HTML page
table
tbody
tr
td
svg
rect (boundary of canvass)
g
g
path
circle id(xyz)
g
path
circle(pqr)
I want that when I hover on any circle only that circle should show do transition.
Here is my code which is not working.
var radius=(weekData[q].bob[p].reach)/15;
d3.select("body").select("svg").select("#outerG").append("g").append("circle")
.attr("cx",coords[0])
.attr("cy",coords[1])
.attr("r",radius)
.attr("class","circle")
.attr("id","xyz")
.style('fill', 'tan')
.attr("onmouseover","myHoverFunction(this)")
.attr("onmouseout","myHoverOutFunction(this)");
function myHoverFunction(obj)
{
d3.select("this.obj").transition()
.duration(1000)
.attr("r",40)
.attr("stroke","red")
.attr("stroke-width",4);
}
Please let me know how can I solve the problem.