Skip to main content
100%

A bar Graph with custom Axis.js

✓ Published1🌍 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
MIT Licensed

Similar vizzes