I have a small question. In my application I'm using d3.js. And I need to get the values of transform attribute. I found the same question How to log rotate attribute in transform using d3.js? But I am using a newer version of the library. How can I get it? Because:
<g class='myclass' transform='translate(30, 0)'>
...
d3.select('.myclass').attr('transform')
return the string.
translate(30, 0)
(I need to get only numbers 30 and 0)I didn't find any functions for this. I can get values using regex, but I think it too much in this case. There must be some normal way to get these values. Thanks!