Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing axes

Public visualization

Viewing a saved revision (read-only)

c33ea4838eb44bab93a378fa4cc3da04

Customizing axes

0 stars1🌍 Public
Ssara17585
Last edited Nov 14, 2019
Created on Nov 14, 2019
Forked from Making a bar chart

A horizontal bar chart displays the populations of ten countries, with bars extending from left to right. The example demonstrates customizing chart axes using D3 v5. Population values are scaled with `scaleLinear`, while country names use `scaleBand` for categorical positioning. The code uses `axisLeft` and `axisBottom` to generate axes, formats tick labels with `format('.3s')` to abbreviate large numbers, and removes default axis lines for a cleaner look. Data is loaded from a CSV file and rendered as SVG rectangles.

AI-generated description