Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a bar chart

Public visualization

Viewing a saved revision (read-only)

fd62507046874d91ac98aba0086a8a9d

Let's make a bar chart

0 stars0🌍 Public
Yyukozome
Last edited Oct 16, 2019
Created on Oct 15, 2019

This example displays a horizontal bar chart of population data for ten countries, using bar length to represent each value. The chart renders as SVG and is built with D3.js v5, employing `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to load data and generate axes. Rectangles are appended via data joins, with a pink fill defined in CSS. The population values are read from a CSV file and scaled by one thousand before rendering.

AI-generated description

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