chapter 7
✓ Published0🌍 Public
This example visualizes six data points mapping salary to friend count using a scatterplot. D3.js v5 creates the SVG circles and axes. It uses `scaleLinear`, `extent`, `axisBottom` with negative tick sizes, and `axisRight` for the y-axis. An empty group element renders the x-axis, while the y-axis appears without an explicit transform. The circles are positioned using the scales from the hardcoded array of salary and friend values.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed