Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Customizing Axes

0 stars1🌍 Public
OOhayouKaminari
Last edited Jan 12, 2020
Created on Jan 12, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of the top 10 most populous countries, with axes customized to improve readability. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to map population and country names, while `axisBottom` and `axisLeft` generate the axes. The x-axis tick labels are reformatted from scientific notation (e.g., “1.4G”) to a clearer “B” suffix using D3’s `format` with string replacement, and grid lines extend across the plot area. The y-axis labels and domain line are removed, and data comes from a local CSV file loaded via `d3.csv`.

AI-generated description

Skriv nån text… kommer ifrån Hejkonbejkon

Comments

Sign in to join the discussion.

MIT Licensed