how to control the simulation speed of d3 force layout

85 views
Skip to first unread message

chen yang

unread,
Dec 30, 2013, 1:17:42 AM12/30/13
to d3...@googlegroups.com
I am following a d3 force laytout example like this:
http://bl.ocks.org/mbostock/1021953

I want to control the speed of the dots flying to the cluster. In other words, I want some dots take more time to get to their final positions, while some dots take less time.

I tried to add a timer function to control the time of each tick, but it did not work.

    this.force = d3.layout.force()
    .on("tick", setTimeout(tick(d), 50));

I need help for this. Thanks!
Reply all
Reply to author
Forward
0 new messages