Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

c479c3f382ef4d77adcddb6db7d4e7e3

Making a Bar Chart

0 stars5🌍 Public
Ggaowxx@qq.com
Last edited Dec 11, 2024
Created on Dec 11, 2024

This bar chart displays the population of ten countries, using horizontal bars scaled linearly from zero to the maximum value. Built with D3 v5, the visualization loads data from a CSV file, converts the population strings to numeric values, and renders SVG rectangles. The chart employs `scaleLinear` and `scaleBand` for positioning, with axes generated via `axisLeft` and `axisBottom`. Bars are styled with a steelblue fill, and the layout includes defined margins for clear presentation.

AI-generated description

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