Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity9_task9

Public visualization

activity9_task9

0 stars0🌍 Public
BBindumadhavi
Last edited Apr 27, 2024
Created on Apr 27, 2024
Forked from HTML Starter

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 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.

Comments

Sign in to join the discussion.

MIT Licensed