Skip to main content
100%

Let's make a face with D3.js!

✓ Published0🌍 Public
FfaRriaN
Last edited Apr 22, 2020
Created on Apr 22, 2020

Despite its title, this example displays a grouped bar chart of U.S. state population data across age brackets, rendered as SVG. The chart uses `d3.scaleBand` for both state and age groups, with a `d3.scaleLinear` for the y-axis and `d3.scaleOrdinal` for color encoding. Animated eyebrow movement is not present; the code instead constructs the chart with D3's DOM-manipulation methods, including `selectAll`, `join`, and `.attr` calls to build the rectangles, axes, and legend.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes