Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
RRiccardo Pressiani
Last edited Oct 1, 2019
Created on Oct 1, 2019
Forked from Customizing Axes

This example shows a horizontal bar chart of the top 10 most populous countries, with population values displayed in billions on a custom axis. The code uses d3.csv to load data, d3.scaleLinear and d3.scaleBand for scales, and d3.axisBottom with a custom tick format that abbreviates numbers (e.g., converting "G" to "B"). The left axis hides its domain and tick lines, while a title and axis label are added as SVG text elements.

AI-generated description
MIT Licensed

Similar vizzes