🌍 Public
Viewing a saved revision (read-only)
e2058f3417b94d9a8b34453dfeae851c
task1_supriya
This example shows a horizontal bar chart comparing the populations of 30 countries in 2020, with each bar labeled by country name. The visualization uses D3.js v5 scales (`scaleBand` for the y-axis and `scaleLinear` for the x-axis) to map data, and React to render SVG elements. Population values are fetched from a CSV file and formatted using D3's `format` function, with tooltips displaying the numeric value when hovering over a bar. The chart includes styled axes and a labeled x-axis, all rendered within an SVG container.
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.