🌍 Public
Viewing a saved revision (read-only)
b088e9fba1ac4d2f890999550436fe52
Tutorial 1 Question 1
This example shows a horizontal bar chart comparing the year 2000 populations of ten countries, with country names on the y-axis and population values on the x-axis. It demonstrates a React-based D3 visualization using modular components for axes and marks, rendered as SVG. The code uses `d3.scaleBand` and `d3.scaleLinear` to map data, `d3.format` to abbreviate tick labels (converting gigabytes to billions), and loads data from a CSV file fetched via `d3.csv`. The chart includes custom styled axes and a labeled x-axis indicating the population metric.
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.