Skip to main content
100%

Customizing Axis

✓ Published1🌍 Public
KKaleb LaBarrie
Last edited Jul 27, 2021
Created on Jul 27, 2021
Forked from Customizing Axes

This visualization displays the top 10 most populous countries as horizontal bars, with population values on the x-axis and country names on the y-axis. It uses d3.csv to load data from a CSV file, then d3.scaleLinear and d3.scaleBand to map values and categories. The axes are customized using d3.axisBottom and d3.axisLeft, with tick labels formatted via d3.format to abbreviate large numbers (e.g., “1.41B”). Bar rectangles are appended to an SVG group with margins applied, and gridlines are created by negative tick sizes on the x-axis.

AI-generated description
MIT Licensed

Similar vizzes