Making a Bar chart
✓ Published0🌍 Public
This example shows a horizontal bar chart of population data for five countries, sorted by country name, with the bars colored steel blue. The chart uses React with D3 v5, loading data from a CSV file and rendering SVG elements. It employs `d3.scaleLinear` for the x-axis population scale, `d3.scaleBand` for the y-axis country categories, and `d3.axisLeft` and `d3.axisBottom` to generate the axes. The bars are appended as SVG `<rect>` elements, with their widths proportional to population values.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed