Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Hello VizHub

Public visualization

Viewing a saved revision (read-only)

6b719be6930340618a997d9c04f259fa

Fork of Hello VizHub

0 stars0🌍 Public
Kkirankumari26guj@gmail.com
Last edited Mar 24, 2025
Created on Mar 24, 2025
Forked from Hello VizHub

This fork of Hello VizHub displays a chocolate sales pie chart, showing the distribution of chocolate brand sales through color-coded slices with a legend. The visualization loads CSV data from a GitHub gist, processes it with D3.js v7’s `d3.rollup` and `d3.pie`, and renders slices using `d3.arc`. A color scale with `d3.scaleOrdinal` assigns distinct colors to each brand. The code also includes a separate reusable `pieChart.js` module using `d3-shape` and `d3-scale-chromatic` for chart generation, with an SVG-based output.

AI-generated description

Chocolate Sales Pie Chart (D3.js)

This D3.js pie chart visualizes chocolate sales by brand using a dataset hosted on Gist.

  • Created for CSCE 5320 Scientific Data Visualization
  • Dataset: Chocolate Sales (brand, sales)
  • Technologies: D3.js v7, VizHub

Legend and labels included.