Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

13e096a4c83e4fbb86373303e6d05a97

Making a Bar Chart

0 stars1🌍 Public
Wwoznicak
Last edited Aug 13, 2020
Created on Aug 8, 2020

This bar chart displays population estimates for eight countries, loading data from a CSV file. Using D3 v5, the code applies `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisLeft` and `d3.axisBottom` to render the axes. Each country’s population, multiplied by 1000, sets the bar width, with tick labels formatted via `d3.format`. The visualization demonstrates SVG rectangle binding through `selectAll().data().enter().append()`, placing bars in a group element with specified margins.

AI-generated description

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