Skip to main content
100%

Customizing axis

✓ Published1🌍 Public
Bbcwein
Last edited Mar 29, 2020
Created on Mar 29, 2020
Forked from Lets make a face!

This example shows a horizontal bar chart of the top 10 most populous countries, with the x-axis customized to display population values in billions using the `d3.format` function with a `.3s` specifier and a text replacement of 'G' to 'B'. The chart uses `d3.scaleLinear` for the population scale and `d3.scaleBand` for the country categories, rendered as SVG rectangles. The y-axis grid lines and domain are removed, while the x-axis includes custom tick formatting and a labeled axis using `d3.axisBottom`. Data is loaded from a CSV file and multiplied by 1000 to convert values to actual population figures.

AI-generated description
MIT Licensed

Similar vizzes