🌍 Public
Viewing a saved revision (read-only)
f4bb3368fc4e45bfa84d236488addeef
Activity6_Question 1
This example shows a horizontal bar chart comparing the population of ten countries in the year 2000, using a dataset loaded from a CSV file. The chart renders as SVG through React components, with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the quantitative x-axis. The code imports d3 functions like csv, scaleBand, scaleLinear, max, and format, and uses d3.ticks for axis generation. Tooltips display each bar’s value on hover via SVG titles.
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.