🌍 Public
Viewing a saved revision (read-only)
47923e3a6ff749a78cba76f4e4bafbf5
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