Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7

Public visualization

Viewing a saved revision (read-only)

cae2cb8e3db740cc804927dcf860de01

Activity 7

0 stars1🌍 Public
Sssuryateja804@gmail.com
Last edited Nov 4, 2024
Created on Nov 4, 2024
Forked from Hello VizHub

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