Customize axis
✓ Published1🌍 Public
This example shows a horizontal bar chart of country populations using a linear scale for the x-axis and a band scale for the y-axis. The code imports `d3.select`, `d3.csv`, `d3.scaleLinear`, `d3.scaleBand`, `d3.max`, `d3.axisLeft`, `d3.axisBottom`, and `d3.format` to load `data.csv`, compute the domain, and render SVG rectangles. The bottom axis is customized with a `.2s` tick format, abbreviating population values (e.g., 1.4M).
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed