Skip to main content

Signature

A Label is a text annotation anchored to a specific bar index and price. Unlike Box text, a Label is not confined to a rectangle - it floats at the coordinate you specify.

Quick example

Options

number
required
X coordinate as a bar index.
number
required
Y coordinate as a price level.
string
required
Text to display.
string
Text color as #RRGGBBAA. Default: white.
number
Font size in pixels. Default: 12.0.
string
Text alignment: "left", "center", "right". Default: "center".
number
Stacking order. Default: 0.
boolean
Render in main price pane from a sub-pane indicator. Default: false.

Handle methods

Annotating pivot highs

Marker

Icon shapes instead of text.

str.*

Format numbers into label text with str.format.

Box

Box also supports embedded text via the text option.