Skip to main content
Public

Share visualization

Loading preview…

assign-2

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

assign-2

0
Vvaishnavi6gan@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Activity-6

This example shows a pie chart displaying fruit quantities from a CSV dataset, using the D3.js v7 library and SVG rendering. The visualization computes slice geometries with `d3.pie()` and draws them with `d3.arc()`, while color assignments come from `d3.scaleOrdinal` with `schemeCategory10`. A legend, also built in SVG, maps each fruit name to its corresponding color using small rectangles and text labels positioned relative to the chart’s center. The code loads data asynchronously via `d3.csv`, and the chart is centered within a 400×400 pixel viewport.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed