Skip to main content
100%

Customizing Axes!

✓ Published1🌍 Public
NNathan Cheever
Last edited Dec 28, 2019
Created on Dec 28, 2019

This example displays a horizontal bar chart of the top 10 most populous countries, using D3.js (v5) to render the visualization in an SVG. Population values are read from a CSV file and scaled with `scaleLinear`, while country names are mapped to the vertical axis using a band scale (`scaleBand`). The left axis is stripped of its default line and domain, and the bottom axis uses a custom tick formatter that abbreviates numbers and converts "G" to "B" for billions. Grid lines extend across the chart via a negative tick size, and the chart includes custom axis labels and a title.

AI-generated description
MIT Licensed

Similar vizzes