Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Labels

Public visualization

Fork of Labels

0 stars1🌍 Public
PPiotr Paszek
Last edited Mar 14, 2021
Created on Mar 13, 2021
Forked from Labels

This example shows a donut chart of five apple-related values with labeled slices. Each label is positioned outside the arc and connected to its corresponding slice via a thin pointer line ending in a circular marker. The implementation uses D3 v6’s `d3.pie` and `d3.arc` to compute slice geometry, with labels placed using trigonometric calculations based on each slice’s mid-angle. SVG markers are defined for both a triangle arrowhead (demonstrated in the README) and the circle used on the pointers, while `d3.scaleOrdinal` with a red-to-blue interpolator colors the slices.

AI-generated description

Arrow tip experiments defs marker

Comments

Sign in to join the discussion.

MIT Licensed