Skip to main content
100%

fresh block

✓ Published0🌍 Public
Aadgramigna
Last edited Feb 9, 2017
Created on Feb 9, 2017

This example shows a donut chart that visualizes categorical data as percentage-labeled arcs, with each slice colored from a seven-color ordinal scale. The visualization is built with D3 v4, using `d3.pie` to compute arc angles, `d3.arc` for both the filled slices and their labels, and `d3.scaleOrdinal` for coloring. Data is loaded from a CSV file via `d3.csv`, with values parsed to numbers and percentages calculated relative to the total. The SVG rendering positions labels using `labelArc.centroid`, and the chart is centered on a 960×500 canvas.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/adgramigna/'>adgramigna</a>'s block: <a href='http://bl.ocks.org/adgramigna/79f3719a902e393f1ed68b404747a21e'>fresh block</a>

mit Licensed

Similar vizzes