Skip to main content
100%

Activity7_Q2

✓ Published0🌍 Public
VVarshith Peddineni
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes