Skip to main content
100%

Pie chart TT

✓ Published1🌍 Public
Hhanulik.ondrej@gmail.com
Last edited Aug 9, 2022
Created on Aug 8, 2022
Forked from Easy bar chart

This example presents a simple pie chart built with D3.js (v4), visualizing a small static dataset of four numeric values. The chart is rendered as SVG within an 800x700 viewport. The code uses the `d3.pie()` layout generator to compute arc segments and the `d3.arc()` function to draw the resulting paths. Each slice is filled with a distinct color from a predefined array. The implementation also highlights direct manipulation of the `d3.arc()` API by logging arcs generated with both computed and constant angle/radius parameters, demonstrating how the path data is constructed.

AI-generated description
MIT Licensed

Similar vizzes