I am trying to change the axis of my graph ( svg:line elements) when I click a button. I want the transition to occur like the dials of a watch.
Line
d3.select(".yAxis").transition().duration(500).attr("transform", function() { var value = invert?0:90; return "rotate("+value+" "+x1+","+y1+")"; });
performs translation and rotation at the same time, which does not serve my purpose.
I want the line to simply rotate around (x1, y1) and not translate or rotate.
How can I do it?
For clarity, here is the fiddle
source share