π Public
Activity8_Task1
This example shows a horizontal bar chart comparing the 2020 populations of 30 countries. It encodes population values as bar lengths on a linear scale, with country names on a categorical y-axis. The chart is built with React and rendered as SVG, using D3 v5 functions like `scaleBand` and `scaleLinear` for scaling, `csv` for loading data from a GitHub-hosted CSV, and `format` for tick labels. A hover tooltip displays the population value for each bar.
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
Comments
Sign in to join the discussion.