Skip to main content
100%

Force Transition

✓ Published0🌍 Public
FFrissAnalytics
Last edited Oct 1, 2018
Created on Dec 8, 2016

A force-directed simulation arranges 100 circles into two distinct clusters, which switch positions when a button is clicked. The chart also includes a quantitative x-axis, making the clusters' locations measurable. Built with D3 v4, it uses `d3.forceSimulation` with `d3.forceX`, `d3.forceY`, and `d3.forceCollide` forces; clicking toggles the strength of the two horizontal forces, causing the groups to slide and swap sides. The simulation is rendered as SVG and animated on each tick, with the source code compiled from ES6 using the Babel browser library.

AI-generated description

A quick, dirty, and evil template for compiling ES6 in the browser.

The Function constructor is a form of eval, and using it is a bad practice.

Also, using Babel in the browser is slow and deprecated.

So, never do this. 😁

forked from <a href='http://bl.ocks.org/plmrry/'>plmrry</a>'s block: <a href='http://bl.ocks.org/plmrry/9e50004af98a3c55a3d59a616685d269'>Babel Standalone Template</a>

forked from <a href='http://bl.ocks.org/plmrry/'>plmrry</a>'s block: <a href='http://bl.ocks.org/plmrry/a23c79db3a30af301386123279f9709b'>Force Transition</a>

gpl-3.0 Licensed

Similar vizzes