🌍 Public
Viewing a saved revision (read-only)
76aaba5762434ef79f55e728ad0d25ea
Pie chart
This example shows a donut-style pie chart that animates between two datasets after a three-second delay. The initial render displays four categorical slices sized 100,000, then re-renders with five new proportions representing a different dataset. The chart uses d3.pie to compute arc angles and d3.arc with an inner radius to create the donut shape, while a d3.scaleOrdinal assigns categorical colors. The visualization is drawn as SVG elements, and both datasets are hardcoded in JavaScript.
AI-generated descriptionMaking a pie chart.