Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

8dfa6d7c6b2147aa8ef677a317377225

Making a Bar Chart

0 stars0🌍 Public
NnWolff20
Last edited May 5, 2022
Created on May 5, 2022

This example shows a horizontal bar chart ranking the populations of ten countries, with values scaled in thousands. The visualization uses D3 v5 to load CSV data, map population values to a linear scale, and country names to a band scale. SVG rectangles are rendered and axes are drawn using d3.axisBottom and d3.axisLeft. The code applies margin conventions, padding, and steelblue fill via CSS.

AI-generated description