Bar Chart
✓ Published1🌍 Public
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed