🌍 Public
Viewing a saved revision (read-only)
0a77a4dc0b174a9b81143562cd08810f
activity6_task1
This example shows a horizontal bar chart comparing the populations of 30 countries for the year 2020, using an SVG rendered through React. The visualization loads data from a CSV file using D3’s `csv` function and displays the bars with D3’s `scaleBand` for the y-axis and `scaleLinear` for the x-axis. Axes are built with custom React components `AxisBottom` and `AxisLeft`, and each bar is a `<rect>` element with a `<title>` tooltip that formats values using `d3.format(".2s")`.
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.