Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
BBat-Erdene
Last edited Jun 27, 2020
Created on Jun 27, 2020

This example shows a bar chart of population by country using a diverging scale where each bar’s length encodes the population value. The chart derives its data from `data.csv`, loading it with `d3.csv`, and renders SVG rectangles appended to a group element. The code uses `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis, and `d3.axisLeft` and `d3.axisBottom` for the axes. A margin convention positions the visualization inside the SVG.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes