Skip to main content
Public

Share visualization

Loading preview…

ICE - 7 Pie chart

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

ICE - 7 Pie chart

0
Ppremsaiv
Last edited Mar 29, 2022
Created on Mar 29, 2022

This example presents a static pie chart that visualizes the percentage of car sales attributed to different car companies. The chart is rendered as an SVG using D3.js version 5, with each slice colored from a predefined palette. The code constructs the pie chart by loading data from a remote CSV file using `d3.csv`, then uses `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` to generate and style the slices. It also appends text labels at the centroid of each slice via `arc.centroid`, and a legend is built manually with rectangles and text elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed