Skip to main content
Public

Share visualization

Loading preview…

Reusable Pie Chart – ICE7

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Reusable Pie Chart – ICE7

3
Jjanisha30gowda@gmail.com
Last edited Oct 24, 2025
Created on Oct 24, 2025
Forked from D3 Starter

This example shows a reusable pie chart that visualizes the average sepal length for three flower types—Rose, Tulip, and Lily—from a CSV dataset. The chart groups the raw data using `d3.rollup` to compute means, then renders slices with `d3.pie` and `d3.arc` within an SVG. A color scale from `d3.scaleOrdinal` maps categories to colors, and a legend is added for identification. The implementation follows a modular function structure, loading D3 v7 via an ES module import.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed