Skip to main content
Public

Share visualization

Loading preview…

ICE-7- Pie Chart for Amazon Data

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 for Amazon Data

0
KKetha
Last edited Mar 29, 2023
Created on Mar 29, 2023
Forked from Pie Chart

This example visualizes country-wise Amazon costs using a pie chart, displaying the top 10 countries by cost with color-coded slices and a legend listing each country’s cost in dollars. The chart is rendered as SVG using D3 v5, with `d3.pie()` to compute arc angles, `d3.arc()` to generate path segments, and `d3.scaleOrdinal()` with `schemeCategory10` for colors. Data is loaded from a CSV hosted on GitHub Gist and sorted before rendering. Interactive mouseover events log the selected country’s cost 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