Skip to main content
100%

Pie Chart for top brands and their prices

✓ Published0🌍 Public
SSwapna1915
Last edited Jul 26, 2023
Created on Jul 26, 2023
Forked from Hello VizHub

A pie chart displays the relative prices of top brands, with each slice labeled by its price in thousands and a corresponding legend listing brand names and values. The chart uses D3 v5 APIs including `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` to generate segments and assign colors, while `d3.csv` loads the dataset from a GitHub Gist. Text labels are positioned via `arc.centroid`, and the SVG renders the chart and legend interactively.

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