🌍 Public
Viewing a saved revision (read-only)
5bc80ba5bb5b4c7a8007e9373fb85ad2
ice7 part2
This example presents an interactive pie chart built with D3.js v7 that visualizes static sales data across four product categories. The chart renders as an SVG, with each category represented by a colored slice, and uses a hover interaction to display a tooltip showing the category name and its sales value. The code employs `d3.pie()` to compute the arc angles, `d3.arc()` to generate the slice paths, and `d3.scaleOrdinal` with `d3.schemeCategory10` for coloring. A separate HTML legend lists each category with its corresponding color swatch.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.