Skip to main content
100%

Customizing Axes

✓ Published1🌍 Public
OOhayouKaminari
Last edited Jan 12, 2020
Created on Jan 12, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of the top 10 most populous countries, with axes customized to improve readability. The chart uses D3 v5’s `scaleLinear` and `scaleBand` to map population and country names, while `axisBottom` and `axisLeft` generate the axes. The x-axis tick labels are reformatted from scientific notation (e.g., “1.4G”) to a clearer “B” suffix using D3’s `format` with string replacement, and grid lines extend across the plot area. The y-axis labels and domain line are removed, and data comes from a local CSV file loaded via `d3.csv`.

AI-generated description

Skriv nån text… kommer ifrån Hejkonbejkon

MIT Licensed

Similar vizzes