Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

713baa5fd8c14c94838754eac524ae9c

Customizing Axes

0 stars2🌍 Public
EEllednera
Last edited Oct 29, 2020
Created on Oct 29, 2020
Forked from Bar Chart

This example shows a horizontal bar chart of the top ten most populous countries, with population values in billions and country names as categorical labels. The visualization customizes both axes by removing default domain lines, styling tick marks and labels via CSS, and formatting tick values with D3’s `format(".3s")` to convert gigabytes into billions. Using `d3.csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom`, it renders SVG rectangles with a steelblue fill, a title, and an x-axis label, all positioned within computed margins.

AI-generated description