Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

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

Comments

Sign in to join the discussion.

MIT Licensed