Skip to main content
100%

Customizing Axes

✓ Published1🌍 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
MIT Licensed

Similar vizzes