Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task9&10

Public visualization

Viewing a saved revision (read-only)

8f9f3b99425b48379cc81cf024bc1155

task9&10

0 stars0🌍 Public
HHanuReddy
Last edited Apr 16, 2024
Created on Apr 15, 2024

This pie chart displays the proportional distribution of fruit quantities from a CSV file, labeling each slice with its fruit name and including a color-coded legend. Built with D3 v7, it uses the `d3.pie` and `d3.arc` generators to compute and render arcs as SVG paths, with `d3.scaleOrdinal` assigning categorical colors. Data is loaded asynchronously via `d3.csv`, and labels are positioned 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.