Skip to main content
100%

Pie chart Test

✓ Published4🌍 Public
VVeerle
Last edited Dec 23, 2020
Created on Nov 25, 2020
Forked from Pie chart Test

This example shows a simple pie chart of browser usage, displaying four labeled slices with a legend-like color scale. The visualization is rendered as an SVG element using D3 v6, with data hardcoded in the script rather than loaded from the CSV file. The code uses `d3.pie()` to compute arc angles, `d3.arc()` to generate path data, and `d3.scaleOrdinal` for color mapping. Each slice includes a text label positioned via `label.centroid()`. The chart is centered on the page using CSS transforms.

AI-generated description
MIT Licensed

Similar vizzes