🌍 Public
activity9_task9
This example presents a pie chart visualizing the net power consumption of India’s top 15 states for the financial year 2015-16, with a color-coded legend listing each state’s year and consumption value in watts. The visualization uses D3 v5’s `pie`, `arc`, and `scaleOrdinal` functions to generate SVG paths, while mouseover events log consumption data to the console. Data is loaded via `d3.csv` from a GitHub gist, sorted descending by consumption, and sliced to the top 15 records.
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
Comments
Sign in to join the discussion.