Accessing d3.js element attributes from the datum?

前端 未结 4 1228
鱼传尺愫
鱼传尺愫 2021-01-30 20:28

I\'m trying to access the cx & cy attributes of some specific svg circles which i have already drawn to the screen using d3.js\'s .data() function, can anyone help out? The

4条回答
  •  盖世英雄少女心
    2021-01-30 21:03

    The simplest here is to give each node a unique id and then select the node with the target id to run your transformation.

提交回复
热议问题