Skip to main content
100%

d3js workshop - circles

✓ Published0🌍 Public
VVyrwn
Last edited Oct 19, 2017
Created on Oct 19, 2017

Three circles render in an SVG across a 720-by-120 canvas, each initially positioned along the x-axis with a fixed radius and vertical center. The example demonstrates D3’s data-join pattern, binding an array of tuples to circle elements and setting their `cx` attributes based on index. A chained transition then animates each circle sequentially, with a one-second delay between starts, over two seconds changing the fill color to the tuple’s second value, increasing the radius to 17, and shifting the y-coordinate to 80. The code uses d3.v3 selection, `.data()`, `.enter()`, `.append()`, and `.transition()` with `.delay()` and `.duration()`.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/mostaphaRoudsari/'>mostaphaRoudsari</a>'s block: <a href='http://bl.ocks.org/mostaphaRoudsari/4663275cf71af0e30e1fe869af90cb39'>03_workshop_the 3 circles</a>

mit Licensed

Similar vizzes