Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
DDaniel Weston
Last edited Jul 12, 2019
Created on Jul 12, 2019
Forked from Lets make a face

This example demonstrates how to build a horizontal bar chart from CSV data using D3 v5 with SVG rendering. It shows population values for various countries, with each bar’s length scaled linearly and categorical labels positioned along the y-axis via `d3.scaleBand`. The code loads `data.csv`, formats population numbers, and renders axes using `d3.axisLeft` and `d3.axisBottom`, alongside rectangles styled with CSS. The visualization highlights the core workflow of data loading, scaling, and SVG element creation in D3.

AI-generated description

An example showing the capabilities of VizHub.

MIT Licensed

Similar vizzes