Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart

Public visualization

Viewing a saved revision (read-only)

0382cc5630df48adbc8e7c3ea6aa6986

Fork of Pie Chart

0 stars0🌍 Public
NNikitha123171
Last edited Mar 26, 2023
Created on Mar 26, 2023
Forked from Pie Chart

This example displays the basic cost of Netflix for the top ten countries by cost-of-living index, using a pie chart with a legend that lists each country and its corresponding cost in dollars. The chart is rendered with SVG via React, using D3 v5 methods such as `pie`, `arc`, `scaleOrdinal`, and `schemeCategory10` to generate the segments and colors. Data is loaded from a CSV file hosted on GitHub Gist, then sorted and filtered before rendering. Hovering over a segment logs the cost value to the console.

AI-generated description

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

See also React Starter.