Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

sample

Public visualization

Viewing a saved revision (read-only)

df77ba5323f0456ab9da74fc30eb50dc

sample

0 stars1🌍 Public
Gganesh.hns48@gmail.com
Last edited Apr 8, 2024
Created on Apr 8, 2024
Forked from Hello VizHub

A pie chart displays the sales distribution of four electronic items—Smartphone, Tablet, Laptop, and Smartwatch—using D3.js v7 with SVG rendering. The chart encodes sales values as arc sizes, with each slice labeled by item name and sales amount, and a positioned legend showing color-coded item categories. Built with `d3.pie` and `d3.arc`, the visualization uses `d3.scaleOrdinal` with `schemeCategory10` for colors and appends path and text elements to the SVG. The legend is constructed as HTML divs, and all data comes from a static in-memory dataset.

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.