🌍 Public
Viewing a saved revision (read-only)
f44733b03cd547b9a27d8e060e10e744
Activity8_Task1_DV_LB_Q1.1
This chart displays the population of ten countries in the year 2000 as horizontal bars, with country names on the y-axis and population counts on the x-axis. Using React with D3 v5, the code loads CSV data via `d3.csv`, transforms the population field, and renders an SVG through React components for axes and marks. The bars are drawn as `rect` elements using `scaleBand` for the categorical y-axis and `scaleLinear` for the continuous x-axis. A tooltip shows the formatted population value, and a custom tick formatter converts values like billions into a compact label.
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.