Skip to main content
100%

D3 Annotation Example

✓ Published0🌍 Public
AAlark Joshi
Last edited Apr 15, 2025
Created on Apr 15, 2025
Forked from D3 Starter

This example demonstrates the d3-annotation library, which adds customizable labels, connectors, and callouts to an SVG visualization. It displays four distinct annotation styles—basic labels, labels with arrow connectors and text wrapping, curved connectors with dot endpoints, and a circular callout—placed on a blank white canvas without any underlying data or scales. The code uses the `d3.annotation()` factory method with `d3.annotationLabel` and `d3.annotationCalloutCircle` types, configuring properties like note position, offset, and connector style. Each annotation is manually positioned with x/y coordinates and rendered by appending a group to the SVG.

AI-generated description
MIT Licensed

Similar vizzes