Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

bf15ca6c1bd04a1faf6243a71ac07f7c

Customizing Axes

0 stars1🌍 Public
Jjf1978
Last edited Jun 2, 2020
Created on Jun 2, 2020
Forked from Making a bar chart

The graphic compares the land sizes of Sweden, Greenland, and the US using horizontal bars, drawn as SVG rectangles scaled with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the quantitative x-axis. The chart customizes both axes: the left axis has its domain and tick lines removed, while the bottom axis removes its domain line, adds gridlines via d3.axisBottom with d3.format(".1s") tick labels, and includes a manual "Population" label. Data is loaded from data.csv using d3.csv, and rendering is handled through d3.select and SVG element appends.

AI-generated description