Skip to main content
100%

Fork of Formatting axis

✓ Published0🌍 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.

MIT Licensed

Similar vizzes