Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Custominzing Axes

Public visualization

Viewing a saved revision (read-only)

abba480067214d76856b4373dedbb7a2

Custominzing Axes

0 stars1🌍 Public
Sstephanie0215
Last edited Sep 23, 2022
Created on Sep 23, 2022
Forked from Making a bar chart

This example visualizes the top 10 most populous countries using a horizontal bar chart, with country names on the y-axis and population values on the x-axis. The chart uses D3 v7’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to render the bars and axes, with custom tick formatting that converts large numbers into abbreviated units. Data is loaded from a CSV file via `d3.csv`, and population values are multiplied by 1000 before plotting. The SVG output includes axis labels, a title, and styled grid lines, all defined in a separate stylesheet.

AI-generated description

T