🌍 Public
Viewing a saved revision (read-only)
cae2cb8e3db740cc804927dcf860de01
Activity 7
This example shows the market share of smartphone brands as a static pie chart with a legend identifying each brand by color. The visualization is rendered as an SVG using D3.js v5, with data loaded from a CSV file hosted on GitHub. The code uses `d3.csv` to parse the data, `d3.pie` to compute the angular layout, `d3.arc` to generate the pie slice paths, and `d3.scaleOrdinal` to assign colors from a predefined categorical palette. The chart includes a legend of circles and text labels, along with a title and axis labels for context.
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.