Skip to main content
100%

Fork of Annotation Label Sandbox

✓ Published0🌍 Public
SSreeram Veerapaneni
Last edited Nov 14, 2022
Created on Nov 13, 2022

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes