Skip to main content
100%

Bar Chart

✓ Published1🌍 Public
PPathan Khuvanejarkhan
Last edited Jan 29, 2023
Created on Jan 28, 2023
Forked from HTML Starter

This example shows a bar chart of the population of India across five census years, drawing horizontal bars whose widths correspond to population values. As the largest populations produce the longest bars, the chart quickly communicates relative magnitudes. Built with React and D3, it uses D3's `scaleLinear` for the x-axis and `scaleBand` for the categorical y-axis, with `scaleOrdinal` and `schemeDark2` providing the bar colors. The data is loaded from a remote CSV file via D3's `csv` function and displayed as SVG rectangles with tooltip titles.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes