Activity_7 Q_1
✓ Published0🌍 Public
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 descriptionMIT Licensed