Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

A bar Graph with custom Axis.js

Public visualization

A bar Graph with custom Axis.js

0 stars1🌍 Public
DDavideSanto
Last edited Mar 21, 2020
Created on Mar 20, 2020

This example displays the world population in 2016 for 24 countries as horizontal bars, sorted by population size. Using D3 v5, the code loads data from a CSV file and renders an SVG bar chart with custom axes. The y-axis uses `scaleBand` for country names, while the x-axis uses `scaleLinear` with custom tick formatting via `format('.3s')` to abbreviate numbers, and grid lines are drawn with `axisBottom` and `tickSize`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed