🌍 Public
Viewing a saved revision (read-only)
f2e791d735074a88b9591147820f90f8
Task - 9&10 - Q1)
This D3.js v7 visualization displays the prices of various gadgets as an interactive pie chart with a legend. It uses `d3.pie` and `d3.arc` to compute the chart geometry, with categorical colors from `d3.schemeCategory10` via `d3.scaleOrdinal`. Hovering over a slice reveals a tooltip showing the gadget name and price, and each slice is labeled with its corresponding name. Data is loaded from a remote CSV file using `d3.csv`. The chart is rendered as SVG, with the legend positioned separately using `d3.select` and appended HTML elements.
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.