Skip to main content
100%

Customizing Axis (own)

✓ Published1🌍 Public
JJustinS1209
Last edited Aug 3, 2019
Created on Aug 2, 2019
Forked from Making a Barchart

This example shows a horizontal bar chart of country populations using D3 v5, with a custom-styled y-axis and numeric labels for each bar. The chart loads population data from a CSV file, scales the values to a linear x-axis and a banded y-axis, and renders filled steel-blue rectangles via SVG. It uses `d3.csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, with margins and a translated group element to position the axes and bars.

AI-generated description
MIT Licensed

Similar vizzes