🌍 Public
Viewing a saved revision (read-only)
7826727a9b53428f99e6e6d409bb7200
Activity9-Ques1
This example shows a basic pie chart visualization built with D3.js, displaying three categorical values from a hardcoded dataset. The chart renders as an SVG with colored arc segments using the `d3.pie` and `d3.arc` generators, with a categorical color scale (`d3.schemeCategory10`) mapping each category to a distinct hue. A legend on the right side labels each category, while x- and y-axis labels are added to the SVG container even though the pie chart itself does not use axes. The code also includes a link to a gist data source, though the dataset is defined inline.
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.