Skip to main content
100%

Bar graph using D3 with ES6

✓ Published0🌍 Public
VVishwa246
Last edited May 1, 2020
Created on May 1, 2020
Forked from HTML Starter

This example displays a horizontal bar chart of population sizes for ten countries, using data from a CSV file. The visualization is rendered as SVG within a React framework, with D3 v5 handling the scales and axes. Specifically, `d3.scaleLinear` maps population values to bar widths, while `d3.scaleBand` positions each country along the y-axis, with `d3.axisLeft` and `d3.axisBottom` generating the tick marks. Bars are appended as `rect` elements, colored steelblue via CSS, and the data is loaded asynchronously using `d3.csv`.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes