Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

4290829f919f4c2bb26f6b42bd24b6b5

Customizing Axes

0 stars1🌍 Public
YYifei Liu
Last edited Aug 27, 2020
Created on Aug 27, 2020
Forked from Making a bar chart

This example shows a horizontal bar chart of the top 10 most populous countries, using population data from the World Bank. It demonstrates customizing D3 axes by removing the default domain lines and gridlines, formatting tick labels to abbreviate large numbers (e.g., "G" to "B"), and adding custom axis titles and a data source citation. The code uses `d3.csv`, `d3.scaleLinear`, `d3.scaleBand`, `d3.axisBottom`, and `d3.axisLeft` to render the SVG chart.

AI-generated description