Making a bar chart
✓ Published1🌍 Public
This example shows a horizontal bar chart ranking ten countries by population, with countries on the y-axis and population values on the x-axis. The code uses D3 v5’s `csv` to load the data, `scaleLinear` and `scaleBand` for scaling, and `axisLeft` and `axisBottom` to render axes. Bars are drawn as SVG `rect` elements, with a steelblue fill, and the chart is fitted within margins inside an SVG canvas.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed