Skip to main content
100%

Pie chart

✓ Published0🌍 Public
JJoachimSchaeffer
Last edited Apr 28, 2020
Created on Apr 28, 2020
Forked from Pie chart

This pie chart example shows a donut-shaped chart with a solid orange center, rendered as an SVG using D3 v5. The chart displays four data segments (10, 20, 30, 60) with a color scale based on `d3.scaleOrdinal`, while radio buttons allow switching between apple and orange datasets (though only the orange dataset is actively rendered). The visualization uses `d3.arc()` to generate both the outer ring and inner circle paths, with the chart positioned at three-fifths of the SVG height.

AI-generated description

Making a pie chart.

MIT Licensed

Similar vizzes