Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Customizing Axes

Public visualization

Customizing Axes

0 stars1🌍 Public
Ccbinh951
Last edited Aug 8, 2020
Created on Aug 8, 2020
Forked from Customizing Axes

This example demonstrates how to customize axes in a bar chart showing population by country. The code loads data from a CSV file and uses D3 v5's `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to generate the scales and axes within an SVG. It renders horizontal bars, with the y-axis listing country names and the x-axis displaying population values. The `csv` function parses the data, and the chart is structured with explicit margins and a grouped `<g>` element for positioning.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed