Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Basic Bar Chart

Public visualization

Viewing a saved revision (read-only)

c552b74282eb4d97a3a7df8f10cbe9f9

Basic Bar Chart

0 stars0🌍 Public
Llittlenanopichu
Last edited Apr 24, 2020
Created on Apr 24, 2020
Forked from Basic Bar Chart

This example displays a horizontal bar chart comparing the populations of ten countries, with bars extending from a shared baseline. The visualization maps each country’s population to bar length using D3’s `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis. It reads the data from a CSV file, multiplies each population value by 1000, and renders the SVG elements with `axisLeft`, `axisBottom`, and appended `rect` shapes. The chart uses a steelblue fill for the bars.

AI-generated description