Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Making a Bar Chart

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed