Task8_Tutorial(1.1)
✓ Published1🌍 Public
This example presents a horizontal bar chart ranking the population of ten countries in the year 2000, sourced from a CSV file and rendered with React and SVG. The visualization uses D3 v5 scales and axes, with `scaleBand` for the categorical country labels and `scaleLinear` for the population values. The code defines custom `AxisBottom`, `AxisLeft`, and `Marks` components to draw the bars and tick marks, and formats tick values using D3’s `format`. Data is fetched with `d3.csv` and loaded asynchronously through a custom `useData` hook, displaying a loading state until ready.
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