Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart

Public visualization

Viewing a saved revision (read-only)

fbb49dd9daf943c1b6254a38e63235fb

Fork of Pie Chart

1 star0🌍 Public
SSravaniPosina
Last edited Mar 11, 2023
Created on Mar 10, 2023
Forked from D3 Starter

This example shows a pie chart of fruit sweetness levels, with each slice labeled by fruit name and its corresponding sweetness value in a legend beside the chart. The visualization splits the data into colored segments using D3’s `pie` and `arc` generators, with colors assigned via `scaleOrdinal`. It loads CSV data from a GitHub gist using `d3.csv`, renders the chart as SVG, and displays legend entries with fruit names and formatted sweetness numbers using `d3.format`. The code uses React for component structure and D3 v5 for all data binding and visual encoding.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.