Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
LLonwabo11
Last edited May 6, 2019
Created on May 6, 2019
Forked from Making a bar chart

This example shows a horizontal bar chart of population data for ten countries, with bars sized proportionally to each nation’s population and labeled along the left axis. The code loads data from a CSV file, multiplies the population values by 1,000, and renders the chart as SVG using D3 v5 APIs such as `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`. Bars are drawn as `rect` elements, transformed into place with a margin-based group, while the axes are appended via D3’s axis components.

AI-generated description
MIT Licensed

Similar vizzes