Activity6_tutorial_1
✓ Published1🌍 Public
This example displays a horizontal bar chart of population data for 30 countries from the year 2020, using a D3 CSV load and React rendering to SVG. The chart encodes country names on the y-axis and population values on the x-axis, with bars colored green and blue tick marks. The code imports `csv`, `scaleBand`, `scaleLinear`, `max`, and `format` from D3, and uses React.js to manage the data-fetching state and render the visualization. Tooltips on each bar show the population value using a SI format that abbreviates large numbers.
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