Activity 7-2.2
✓ Published0🌍 Public
This example displays a horizontal bar chart ranking the population of ten countries in 2010, using green bars with blue tick marks and country labels on the left axis. It loads population data from a CSV file via `d3.csv`, then slices the first ten rows. The chart is built with React components, using `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis. SVG rendering with D3 v5 handles the visual output, including a formatted axis using `d3.format`.
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.
MIT Licensed