🌍 Public
Viewing a saved revision (read-only)
72d7ca3ad63e455181e4098cb1462ed4
SucharithaKudapa_Assignment2
This pie chart visualizes market share distribution among makeup and skincare brands, displaying each brand’s percentage directly on its corresponding slice. The chart uses D3.js v7’s `d3.pie()` and `d3.arc()` generators to compute and render the arcs, with an ordinal color scale (`d3.scaleOrdinal`) assigning distinct colors to each brand. Data is loaded from a remote CSV file via `d3.csv`, with market cap values parsed numerically. A separate legend lists brands alongside their categories, while text labels on the chart show brand names and calculated percentages.
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.