Skip to main content
100%

Bar Chart

✓ Published1🌍 Public
SShweta-tech
Last edited Feb 4, 2020
Created on Jan 5, 2020
Forked from Customizing Axes

This example shows a horizontal bar chart comparing the populations of ten countries, using a linear scale for population values and a band scale for country names. The bars are rendered as SVG rectangles, with axes generated using d3.axisLeft and d3.axisBottom. The code loads data from a CSV file via d3.csv, converts population values from thousands to absolute numbers, and applies a margin-based layout. The chart is built with React, though the visualization itself uses D3 v5 directly to manipulate the SVG.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes