This may be a FAQ, so feel free to point me to another answer. The topic is difficult to search on.
If I want to use d3.js to get an attribute that\'s explicitly de
D3 has a built in function to parse svg transforms: d3.transform
You could use it to get the translate array ([x, y]) of the transform, i.e.:
var transformText = d3.select("#mygroup").attr("transform"); var translate = d3.transform(transformText).translate; //returns [0,-25]