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
TTsen Hsieh
Last edited Nov 6, 2022
Created on Sep 27, 2022

This example presents a horizontal bar chart of population counts for eight countries, drawn as SVG rectangles. The chart uses D3 v7's `scaleLinear` and `scaleBand` to map population values and country names to positions, with axes formatted using `format` and custom tick labels. Data is loaded from a CSV file via `csv()`, and the bars are rendered by appending `rect` elements to an SVG group.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed