🌍 Public
Viewing a saved revision (read-only)
a1d748f8c0d547aa9759d1ab927d7635
Activity_7 Q_1
This example shows a pie chart of five books and their average ratings, using a static dataset embedded in the code. The chart is rendered as an SVG using D3 v7, with pie slices generated by the `d3.pie` and `d3.arc` functions, colored via `d3.scaleOrdinal` and `d3.schemeCategory10`. Labels are placed at each slice’s centroid, and a legend with color swatches and rating values appears on the right. The SVG is styled with a white background and subtle shadow.
AI-generated description