firoze_Q1
✓ Published0🌍 Public
This example displays the distribution of ice cream sales as a pie chart, with each slice sized proportionally to its sales category and accompanied by a legend. It uses D3 v7, loaded via UNPKG, to generate an SVG graphic with the `d3.arc()` and `d3.pie()` functions for the chart layout. The page renders static, pre-defined data without interactivity, and styles the container, SVG, and legend items using a separate CSS file. The legend is built dynamically with DOM elements to match the chart’s color-coded slices.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed