Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

8eecf341c8b54a73863d8ce3090fb292

Customizing Axes

0 stars0🌍 Public
JJovenne Naldrey Sapuay
Last edited Sep 4, 2019
Created on Sep 4, 2019
Forked from Customizing Axes

This example displays a horizontal bar chart ranking 15 countries by speed camera density, as sourced from a Spectator Index tweet. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to map camera counts and country names, with `axisBottom` and `axisLeft` generating custom gridlines and ticks. Numerical labels are formatted using `d3.format` to abbreviate values, while the y-axis hides its domain and ticks for a cleaner look. SVG rectangles render the bars, with margins and axis titles controlled via CSS classes.

AI-generated description

Data on speed traffic cameras from this tweet.