Thursday, July 10, 2014

D3 "translate", easier way to assign position

"transform"+ "translate" seems an easier way to assign components' positions in D3. It works the same way as (dx, dy). Here is am example of drawing circles.

usually, components are located with specified dx, dy


















An much simpler version could be done with "translate"















both actually do the same job


No comments:

Post a Comment