Pie Chart for top brands and their prices
✓ Published0🌍 Public
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 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