Fork of Let's make a face with D3.js!
✓ Published1🌍 Public
This example demonstrates fundamental DOM manipulation with D3.js v5 by rendering a smiley face with movable eyebrows. The SVG output is generated through D3’s selection and data-binding methods, such as `select`, `selectAll`, and `enter`, which append rectangles to the canvas based on a hardcoded array of four values. The code uses D3’s `attr` to set position and size properties, while a commented-out CSV import suggests potential external data sources. The visual result is interactive only in the sense that the rectangles’ placement is computed from the data array, with a red page background and green SVG fill.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed