Skip to main content
100%

firoze_Q1

✓ Published0🌍 Public
Sshaikfiroze186@gmail.com
Last edited Apr 21, 2024
Created on Apr 21, 2024

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes