Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing axes

Public visualization

Customizing axes

0 stars0🌍 Public
ZZhengyan Yu
Last edited Apr 8, 2020
Created on Apr 8, 2020
Forked from Making a bar chart

This example displays a horizontal bar chart of the ten most populous countries, with population values scaled linearly and countries ordered by rank on a band scale. The visualization customizes both axes by removing their default domain lines and ticking, while formatting population ticks to abbreviate billions as “B” via d3.format. It also applies a tick size that extends grid lines across the chart. The code uses d3.scaleLinear, d3.scaleBand, d3.axisBottom, d3.axisLeft, and d3.csv to load the population data, rendering SVG rectangles with steelblue fill.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed