Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Basic Bar Chart

Public visualization

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

Comments

Sign in to join the discussion.

MIT Licensed