🌍 Public
Viewing a saved revision (read-only)
f3ff424d455845d0a4e4a2925ee5ef8b
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 descriptionA demonstration of how to start using D3 version 6.