Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Formatting axis

Public visualization

Viewing a saved revision (read-only)

4a64a0a8e0d54a1090d06b2dfefe7a02

Fork of Formatting axis

0 stars0🌍 Public
Sssdrockstar1
Last edited Jul 10, 2022
Created on Jul 8, 2022
Forked from Formatting axis

This bar chart displays the population of the top 10 most populous countries, with country names on the y-axis and population values on the x-axis, using a horizontal layout. It loads data from a CSV file and renders as SVG within a React framework, leveraging d3.scaleLinear and d3.scaleBand for scales. The code formats the x-axis tick labels using d3.format’s ".3s" abbreviation and applies d3.axisLeft and d3.axisBottom for the axes. Each bar’s width corresponds to the population, with steelblue fill and custom font styling from CSS.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.