Skip to main content
100%

Pie chart

✓ Published2🌍 Public
Hhanulik.ondrej@gmail.com
Last edited Jul 31, 2022
Created on Aug 9, 2021

A pie chart displays the proportional breakdown of a categorical variable, using colored slices to represent each category's share of the whole. The example renders a fixed dummy dataset (`{a: 9, b: 20, c:30, d:8, e:12}`) as SVG paths, with each slice's angle determined by `d3.pie` and its geometry drawn via `d3.arc`. Colors come from `d3.scaleOrdinal` with a manually specified palette, and the chart is centered within a 450×450 pixel canvas. The code uses the D3.js v4 library, appending the visualization to a `<div>` and styling slices with black strokes and 0.7 opacity.

AI-generated description

Alt+96 = `<br> Alt+ů = $<br> Základní bar chart je hotový do 3:42:42

MIT Licensed

Similar vizzes