Skip to main content

PlotObjectAnnotations

PlotObjectAnnotations is a type that is used to define the Annotations to be rendered by the PlotObject component.

it has one main property, type, which decide the content you want to render and the properties that are available for that content.

  • type: The type of the content. type: "arrow" | "circle | "ellipse" | "line" | "rectangle" | "shape" | "text" | "group"

the following is a list of properties that differ between the different types:

Arrow

it's used to add an Arrow Annotation to the plot.

the other properties are the same as the Arrow properties.

Example : { type: "arrow", x1: 0, y1: 0, x2: 1, y2: 1}

Circle

it's used to add a Circle Annotation to the plot.

the other properties are the same as the Circle properties.

Example : { type: "circle", x: 0, y: 0, r: 1}

Ellipse

it's used to add an Ellipse Annotation to the plot.

the other properties are the same as the Ellipse properties.

Example : { type: "ellipse", x: 0, y: 0, rx: 1, ry: 1}

Line

it's used to add a Line Annotation to the plot.

the other properties are the same as the Line properties.

Example : { type: "line", x1: 0, y1: 0, x2: 1, y2: 1}

Rectangle

it's used to add a Rectangle Annotation to the plot.

the other properties are the same as the Rectangle properties.

Example : { type: "rectangle", x1: 0, y1: 0, x2: 1, y2: 1}

Shape

it's used to add a Shape Annotation to the plot.

the other properties are the same as the Shape properties.

Example : { type: "shape", shape: "square", x: 0, y: 0, size: 1}

Text

it's used to add a Text Annotation to the plot.

the other properties are the same as the Text properties.

Example : { type: "text", x: 0, y: 0, children: "hello world"}

Group

it's used to add a Group Annotation to the plot.

it has one other property, children, which is an array of the annotation to be added inside the group.