Skip to main content
100%

ice7 part2

✓ Published0🌍 Public
Jjammigumpula.priyanka193@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024
Forked from HTML Starter

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 description

Enhanced Pie Chart

This HTML file generates an interactive pie chart using D3.js library to visualize sales data for product categories. Each category is represented by a slice, with colors indicating different categories. Hovering over a slice displays the category name and corresponding sales value in a tooltip. Additionally, a legend is provided to identify each category's color.

MIT Licensed

Similar vizzes