Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Custominzing Axes

Public visualization

Viewing a saved revision (read-only)

ed559d2b42a646618344b28b85df2b9e

Custominzing Axes

0 stars1🌍 Public
RRubens
Last edited Sep 6, 2018
Created on Sep 6, 2018
Forked from Customizing Axes

This bar chart displays the population of the top 10 most populous countries in 2018, based on United Nations data. It uses a linear x-scale for population and a banded y-scale for country names. The code employs D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` APIs to render axes, with tick labels formatted using `format(".3s")` and a custom replacement of 'G' with 'B' for billions. Grid lines are drawn via `tickSize(-innerHeight)`, and the chart is rendered as SVG.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017.