Skip to main content
100%

Customizing Axes

✓ Published2🌍 Public
Ssaeedtajikai
Last edited Feb 27, 2020
Created on Feb 27, 2020

This example shows a horizontal bar chart of the populations of the ten most populous countries, using a CSV data source. D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` position the bars and axes, while the bottom axis’s tick labels are formatted with `format(".2s")` and a custom replacement of ‘G’ with ‘B’. The chart removes default axis domain lines and y-axis tick marks to create a cleaner look, and appends custom text elements for the axis label and title.

AI-generated description
MIT Licensed

Similar vizzes