Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie chart Test

Public visualization

Viewing a saved revision (read-only)

7e8072c3a3ff4cbc90bf22a953c7d42b

Fork of Pie chart Test

0 stars0🌍 Public
SSonuSriN
Last edited Mar 23, 2022
Created on Mar 23, 2022
Forked from Pie chart Test

This visualization displays a basic pie chart of browser usage shares, with segments colored by a sequential ordinal scale and labeled with their names. The chart is rendered as an SVG using D3 v6, with data hardcoded in the script rather than loaded from the included CSV file. The code uses `d3.pie()` to compute arc angles, `d3.arc()` to generate path data, and `d3.scaleOrdinal()` for color mapping, while labels are positioned using an inner arc's centroid. The SVG is centered via CSS, and the visualization is based on a tutorial by FrontendTips.

AI-generated description