Assignment2-1
✓ Published0🌍 Public
This example displays a pie chart of soft drink sales, rendered as an SVG using D3.js. It loads CSV data from a GitHub gist and applies a pie layout to compute arc angles. The chart uses `scaleOrdinal` and `schemeCategory10` for color encoding, with each drink labeled outside the slice using an extended arc’s `centroid` method. A legend is positioned to the left, and all elements are generated through D3’s data joins and arc generators.
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