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
NNikitha123171
Last edited Mar 26, 2023
Created on Mar 26, 2023
Forked from Pie Chart

This example visualizes the Crime Index for the top ten countries using a pie chart, with each slice sized by the country’s Crime Index percentage and colored via a categorical scale. The chart renders as SVG, with a legend listing each country, its color swatch, and its corresponding percentage value. Built with React and D3 v5, the code loads CSV data from a GitHub gist, sorts it in descending order, and slices the top ten entries. It employs d3.pie, d3.arc, d3.scaleOrdinal, and d3.schemeCategory10 for layout and coloring, with mouseover logging to the console.

AI-generated description

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

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed