🌍 Public
Viewing a saved revision (read-only)
a462ea8820064d778c4cca2c407ee5d8
Task-9 Q2
This visualization shows the yearly percentage of U.S. government education expenditure over time, using a single filled area to represent the trend. The area chart is rendered as an SVG with D3.js v7, loading CSV data from a GitHub gist. The code uses `d3.csv` to fetch data, `d3.scaleLinear` for both axes, and `d3.area` to generate the chart’s path. Axes are added via `d3.axisBottom` and `d3.axisLeft`, with labels for "Year" and "Gov Education Expenditure (%)". The chart is styled with a steelblue fill and includes margins for readability.
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.