Activity_7
✓ Published0🌍 Public
This example visualizes market share by category as a pie chart with a sorted legend showing each category’s percentage. It loads CSV data from a remote GitHub source, computes arc positions with `d3.pie` and renders slices via `d3.arc` into an SVG. A `d3.scaleOrdinal` with `d3.schemeCategory10` assigns colors, while the legend displays sorted percentages beside the chart. The code demonstrates D3 v6 loading via UNPKG and local ES6 module imports.
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