Activity7_Q2
✓ Published0🌍 Public
This example displays an area chart comparing tree species by average height and lifespan, with two overlapping translucent regions representing each metric. It loads data from a CSV file hosted on GitHub Gist and renders the visualization as an SVG. The code uses D3 v7 APIs including `csv`, `scaleBand`, `scaleLinear`, `area`, `axisBottom`, and `axisLeft` to construct the chart. The `area` generator creates the filled paths, with categorical color coding—blue for height and orange for lifespan—and the chart adapts to the viewport size.
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