Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
LLonwabo11
Last edited May 6, 2019
Created on May 3, 2019
Forked from Customizing Axes

This horizontal bar chart shows the populations of nine countries, ordered by country name and scaled linearly by population. The example demonstrates how to customize axis ticks, converting the default numeric labels from billions to abbreviated values with the suffix 'B'. Built with D3 v5, the code uses `d3.scaleBand` and `d3.scaleLinear` to map data, and `d3.axisLeft` and `d3.axisBottom` to render the axes. The `axisBottom` is formatted using `d3.format` with a custom replacement to display values in billions. The data is loaded from a CSV file and rendered in an SVG.

AI-generated description
MIT Licensed

Similar vizzes