Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Viewing a saved revision (read-only)

b928fc5888414f5ebf80be0da336de46

Customizing Axes

0 stars2🌍 Public
Ddaigokawabe
Last edited Jul 19, 2020
Created on Jul 19, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of population counts for East Japan’s most populous prefectures, with custom-styled axes for readability. It loads CSV data using `d3.csv`, scales populations with `d3.scaleLinear` and prefectures with `d3.scaleBand`, and renders bars as SVG `rect` elements. The axes are built with `d3.axisLeft` and `d3.axisBottom`, using `d3.format` for compact number labels and custom tick sizes and gridlines. Axis labels and titles are added manually, with the default domain lines removed for a cleaner design.

AI-generated description