Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
AAznaggar
Last edited Jan 7, 2020
Created on Jan 7, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of the top 10 most populous countries, with a customized axis that abbreviates large population values (e.g., converting billions to "B") using d3.format. The chart reads from a CSV file and renders as SVG rectangles with steelblue fill. It uses d3.scaleBand and d3.scaleLinear for positioning, along with d3.axisLeft and d3.axisBottom for axes, while stripping default tick lines and domains via selection methods.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes