Skip to main content
100%

Let's make a Bar Chart with D3.js!

✓ Published1🌍 Public
AAli Ahmed
Last edited Nov 30, 2018
Created on Nov 29, 2018
Forked from Blank Canvas

This horizontal bar chart ranks the populations of ten countries, from China down to Mexico, using a logarithmic-free linear scale where bar length corresponds to population in thousands. Built with D3.js v5, the visualization uses `d3.csv` to load data from `data.csv`, `d3.scaleBand` and `d3.scaleLinear` for axes, and `d3.axisLeft` and `d3.axisBottom` for labels. The SVG rendering applies a steelblue fill to all bars via CSS, with the chart area set to 960 by 500 pixels.

AI-generated description
MIT Licensed

Similar vizzes