Skip to content

Core concepts ​

This section covers the fundamental concepts of using @linkurious/ogma-annotations in a TypeScript project.

Controller ​

This is the main class that manages annotations. All the functionality is exposed through the controller. It manages renderering, state and user interactions.

Annotation Types ​

Supported annotations types and their JSON representations.

Events ​

In order to react to user interactions and changes in the annotations, the controller emits events. You can listen to these events to perform custom actions.

Renderer ​

Ogma anntotations come with the default SVG renderer for drawing annotations on the graph. SVG is chosen for high-quality rendering and exports. You cannot access the renderer directly, but you can customize the appearance of the annotations.

State Management ​

Plugin manages the state of annotations internally, allowing you to focus on creating and manipulating annotations without worrying about low-level state handling. It provides useful methods to do undo/redo changes, manage history, and persist state. They are exposed through the controller.