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
LLucas Meirelles
Last edited Aug 14, 2020
Created on Aug 14, 2020

This example displays a horizontal bar chart of country populations. The chart uses a linear scale for the population axis and a band scale for country names, with bars colored steelblue. The code loads data from a CSV file, converts the population values from strings to numbers, and multiplies by 1000. It uses D3 v5 with SVG rendering, building the visualization through API functions like `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed