Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar graph using D3 with ES6

Public visualization

Viewing a saved revision (read-only)

056e8af2c784426f9477329db8af4487

Bar graph using D3 with ES6

0 stars0🌍 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.