Fork
✓ Published0🌍 Public
This visualization displays the total annual rainfall in India from 1960 to 2017 as an area chart, with a hover tooltip revealing the exact value for each year. The chart uses D3.js v7 to load CSV data, aggregate rainfall by year across all states, and render the area with d3.area. The x-axis (year) is linear, and the y-axis (rainfall in mm) is scaled to the maximum aggregate. An interactive overlay rect captures mouse movements, using d3.bisector to locate the nearest year and display a tooltip and hover point.
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