Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity9-Ques1

Public visualization

Viewing a saved revision (read-only)

7826727a9b53428f99e6e6d409bb7200

Activity9-Ques1

0 stars0🌍 Public
Ssirichandana017@gmail.com
Last edited Apr 17, 2024
Created on Apr 17, 2024

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