🌍 Public
Viewing a saved revision (read-only)
4dd9d85c726d4523bf9ff3222250c94f
Fork of Activity8_Task1_DV
This example presents a horizontal bar chart ranking the populations of 30 countries in 2020, using green bars to encode the population values along the x-axis, with country names on the y-axis. Written in React with D3 version 5, the code defines reusable components for axes and marks, leveraging `d3.scaleBand`, `d3.scaleLinear`, and `d3.max`. Data is loaded from a CSV file via the d3 `csv` function, and the rendering uses SVG `rect` elements. The chart includes axis labels, tick marks, and a tooltip showing abbreviated population values.
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.