🌍 Public
Viewing a saved revision (read-only)
5338f2208e694239badb6388b69b95ad
SDV_ACT_7.1_Q1
This pie chart shows the distribution of gym types—Premium, Budget, and Standard—across ten sample gyms, including the count and percentage for each category. The visualization uses D3 v7’s `d3.pie()` and `d3.arc()` to generate the SVG paths, with a `d3.scaleOrdinal()` color scale based on `d3.schemeCategory10`. Each slice is labeled with its type, count, and percentage, computed from the hardcoded `gymData` array. The chart is rendered as an SVG, with the legend and labels placed directly on the arcs using `arc.centroid()`.
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.