Skip to main content
100%

Let's make a face with D3.js

✓ Published1🌍 Public
GGeolffrey S Mena
Last edited Dec 21, 2019
Created on Dec 21, 2019

This example demonstrates the fundamental D3.js data-join pattern by rendering a row of red circles that function as a face. The code uses `d3.select` and `d3.range` to generate an array of fruit objects, then binds that data to SVG circles with `selectAll().data().enter()`. After an initial render, `fruits.pop()` removes one data element, and the `exit()` selection turns that circle black to visualize the removal. The SVG canvas measures 960×500 pixels, with circles spaced 120 pixels apart.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes