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
BBKirst3
Last edited Feb 10, 2021
Created on Feb 8, 2021

This example shows a horizontal bar chart ranking the eight most populous countries, using population data from a CSV file. The chart uses D3 v6’s `scaleLinear` and `scaleBand` to map population values and country names to SVG rectangles. Axis ticks are formatted with `format('.3s')`, and the y-axis labels are cleaned by removing domain lines. The visualization also includes a custom title and an axis label for population, with all styling handled through CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed