Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

chapter 7

Public visualization

Viewing a saved revision (read-only)

40550bce568241388c08ee0ee144d696

chapter 7

0 stars0🌍 Public
EEmmanuel Chukwujindu
Last edited Apr 1, 2021
Created on Apr 1, 2021

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 description

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