Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
MMatthew Rubino
Last edited Jun 3, 2021
Created on Jun 3, 2021
Forked from Making a Bar Chart

This example shows a horizontal bar chart of the top 10 most populous countries, using a dataset loaded from a CSV file. The chart customizes both axes: the y-axis displays country names with tick lines removed, while the x-axis uses a custom tick format that abbreviates large numbers and replaces "G" with "B" for billions. Rendered as an SVG using React and D3 v6, the code employs `scaleLinear`, `scaleBand`, `axisBottom`, and `axisLeft`, with margins and axis labels styled via CSS.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes