Skip to main content
100%

D3 v4 shape drag

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 4, 2017
Created on Mar 4, 2017

Seven SVG shapes—circle, cross, diamond, square, star, triangle, and wye—are rendered using the `d3.symbol` API, colored with `d3.schemeCategory10`. Upon appearing, each shape drops into place via a staggered `transition`. A `d3.drag` interaction lets the user drag any shape by its offset coordinates, bringing it to the front with `raise()`. Built with D3 v4, the example demonstrates modular shape-drawing and pointer-event handling for direct manipulation.

AI-generated description

Drag 'em!

forked from <a href='http://bl.ocks.org/feyderm/'>feyderm</a>'s block: <a href='http://bl.ocks.org/feyderm/4d143591b66725aed0f1855444752fd9'>D3 v4 shape drag</a>

mit Licensed

Similar vizzes