Skip to main content
100%

Customizing axes

✓ Published1🌍 Public
JJason-Manbodh
Last edited May 22, 2020
Created on May 21, 2020
Forked from Making a bar chart

This visualization displays the top 10 most populous countries as horizontal bars, using a bar chart with custom axes. The chart is rendered as SVG with D3 v5, using `d3.scaleBand` for the categorical country axis and `d3.scaleLinear` for the population scale. The code customizes both axes: it removes the y-axis domain and tick lines, and applies a tick format function using `d3.format('.3s')` to abbreviate population values, replacing 'G' with 'B'. The x-axis includes tick lines spanning the chart height and a custom axis label, while a title annotates the top of the visualization.

AI-generated description
MIT Licensed

Similar vizzes