Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a barchar

Public visualization

Making a barchar

0 stars1🌍 Public
Mmbicki
Last edited Apr 17, 2022
Created on Apr 4, 2022

This example shows the population of nine countries as horizontal bars, sorted from China to Russia, with the title “Top populous countries” and labeled axes. The bar chart is rendered as SVG using D3 v5, with `scaleLinear` for the x-axis and `scaleBand` for the y-axis. Data from a CSV file is loaded via `d3.csv`, and population values are multiplied by 1000. Axis and tick formatting use `axisLeft`, `axisBottom`, and `format('.3s')`, with gridlines drawn via `tickSize`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed