Fork of Annotation Label Sandbox
✓ Published0🌍 Public
This example demonstrates how to add a single annotation label with an arrow connector to an SVG canvas using the d3-annotation library. The code creates a text title and subtitle, then defines an annotation object with custom note text, title, wrapping width, and alignment, along with a connector ending in an arrow. The annotation is rendered via `d3.annotation()` and `d3.annotationLabel`, with the SVG display styled using CSS, including the Lato font and a white background. The underlying data is hardcoded in JavaScript as an array of annotation objects.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed