Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing axes of a bar chart

Public visualization

Customizing axes of a bar chart

0 stars2🌍 Public
Jjingwg3@163.com
Last edited Sep 19, 2022
Created on Sep 19, 2022
Forked from making a bar chart

This example displays a horizontal bar chart of the ten most populous countries, using a CSV dataset. It customizes both axes by removing domain lines, adding grid lines via tick sizing, and formatting population values with the `d3.format` method to abbreviate billions. The chart also includes labeled axis titles and a main title, all rendered with SVG elements and styled through CSS. The implementation uses D3 v5 functions like `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft`, with margins defining the inner plot area.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed