Skip to main content
100%

Customising Axes

✓ Published1🌍 Public
Bbrett@cloudaccelerator.co
Last edited Sep 1, 2020
Created on Sep 1, 2020
Forked from Making a Bar Chart

This example displays a horizontal bar chart of the top 10 most populous countries, with population values formatted in billions using `d3.format`. The code customizes both axes: the y-axis removes its domain and tick lines for a cleaner look, while the x-axis uses a custom tick format that converts 'G' to 'B' and adds grid lines via `tickSize`. Data is loaded from a CSV file using `d3.csv`, and scales are created with `d3.scaleLinear` and `d3.scaleBand`. The visualization is rendered as SVG within a React framework.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes