Is it possible to use a path generated like this to place objects?
var line = d3.svg.line()
.x(function(d) { return d.x; })
.y(function(d) { return d.y; })
.interpolate("basis");
The goal is to achieve an even distribution of objects along the path like this:
D3 doesn't provide anything to do that; you'd have to compute the positions of the circles yourself. You may find this demo helpful for determining points along a path.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.