Skip to main content
100%

Gist 1077277

✓ Published0🌍 Public
CCaged
Last edited Jul 12, 2011
Created on Jul 12, 2011

This example shows a small donut chart that visualizes three named data points (Tom, Sally, John) with their corresponding numeric values, using a 400 by 400 pixel SVG canvas. The chart renders each slice with a distinct color from the categorical color scale, and labels each slice with its value formatted to two decimal places. The visualization is built with D3.js version 1.25.0, specifically using the `d3.layout.pie` for the pie layout and `d3.svg.arc` to define the donut's inner and outer radii. A click handler logs the data object of a clicked slice to the console. The data is hardcoded in the script, with no external source.

AI-generated description

Similar vizzes