Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart (with labels) with d3

Public visualization

Viewing a saved revision (read-only)

2fdce0d409a54b1580bc9a37ef1de4a0

Pie Chart (with labels) with d3

0 stars0🌍 Public
SSweetierams
Last edited Jul 3, 2022
Created on Jul 3, 2022

This example shows a pie chart comparing weather conditions across ten Walmart locations, with slices labeled by festival names and their corresponding values. Built with React and rendered as SVG, the chart uses d3.pie() and d3.arc() to generate the slices, while d3.scaleOrdinal with d3.schemeCategory10 assigns colors. Interactive hover effects adjust slice opacity and display a tooltip containing the location name and value, positioned via d3.mouse(). Data is loaded from an external CSV file using d3.csv.

AI-generated description