Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
SShengjie-Sun
Last edited May 13, 2019
Created on May 13, 2019
Forked from Customizing Axes

This example shows the top 10 most populous countries in 2018, using a horizontal bar chart with customized axes. It builds on a basic bar chart by removing unnecessary axis lines, using d3.axisBottom and d3.axisLeft, and formatting tick labels with d3.format to display populations in billions. The code loads data from a CSV file and uses d3.scaleLinear and d3.scaleBand for positioning. Light gray grid lines extend from the x-axis ticks, and the chart includes custom titles and axis labels.

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. It also demonstrates customization of D3 axes.

See also the first bar chart visualization that this one builds on: Making a Bar Chart.

MIT Licensed

Similar vizzes