Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
Zzlastefcia
Last edited Sep 7, 2020
Created on Sep 4, 2020

This example shows a horizontal bar chart ranking ten countries by population, from China down to Mexico. It is an SVG rendering built with D3 version 6, using the `csv` function to load the data, `scaleLinear` for the x-axis, `scaleBand` for the y-axis, and `axisLeft` and `axisBottom` to draw the axes. The chart is generated by appending `rect` elements to an SVG group, with the data sourced from a CSV file where population values are multiplied by 1000.

AI-generated description
MIT Licensed

Similar vizzes