Activity6_population-2010
✓ Published0🌍 Public
This example displays a horizontal bar chart comparing the populations of 20 countries in 2010. The visualization uses React with D3 v5 scales, including `scaleBand` for the categorical country axis and `scaleLinear` for the population values. The chart fetches CSV data from a GitHub repository, formats the tick labels with `d3.format`, and renders SVG bars with tooltips via the `<title>` element. Purple bars, blue axis lines, and custom labels for both axes and the chart title are styled through CSS classes.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed