Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SDV_ACT_7.1_Q1

Public visualization

Viewing a saved revision (read-only)

5338f2208e694239badb6388b69b95ad

SDV_ACT_7.1_Q1

0 stars0🌍 Public
MMANEEDI NAGAKIRAN
Last edited Nov 4, 2024
Created on Nov 2, 2024
Forked from Hello VizHub

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