Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

customizing axes

Public visualization

Viewing a saved revision (read-only)

de76d5abe9fd461884cf1e406f15332c

customizing axes

0 stars1🌍 Public
Ttheaddies
Last edited Feb 21, 2022
Created on Feb 21, 2022
Forked from Making a bar chart

This example shows a horizontal bar chart of the top 10 most populous countries, with custom axis styling. It uses d3.csv to load population data, d3.scaleBand for the categorical y-axis, and d3.scaleLinear for the numeric x-axis. The code removes default axis domains and gridlines via selections, applies custom tick formatting with `format('.3s')` to abbreviate large numbers, and adds axis titles and a graph title. All rendering is done with SVG elements, with bar colors and text styles defined in an external stylesheet.

AI-generated description