Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

SucharithaKudapa_Assignment2

Public visualization

Viewing a saved revision (read-only)

72d7ca3ad63e455181e4098cb1462ed4

SucharithaKudapa_Assignment2

0 stars0🌍 Public
Ssuchigeneralpur@gmail.com
Last edited Apr 13, 2024
Created on Apr 13, 2024

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 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.