interface PaneLegendOptions {
    actions?: readonly PaneLegendAction[];
    collapsed?: boolean;
    color?: string;
    font?: number;
    hasOpenInterest?: boolean;
    hidden?: boolean;
    iconSize?: number;
    id: string;
    left?: number;
    maximized?: boolean;
    params?: string;
    row?: number;
    status?: LegendStatusSource;
    statusLine?: LegendStatusLineOptions;
    title: string;
    top?: number;
    valueColor?: string;
    visible?: boolean;
}

Properties

actions?: readonly PaneLegendAction[]

Which inline action buttons to draw, left to right. Each hit-tests as ${id}::<action>:

  • up / down: move this pane one slot (::up / ::down)
  • hide: toggle visibility (::hide)
  • settings: open this source's settings (::settings)
  • source: show the code this source was written from (::source)
  • collapse: fold this pane to a header strip, or open it again (::collapse)
  • maximize: expand this pane to fill the chart (::maximize)
  • close: remove the source, and its pane if it empties (::close)

When only some actions fit, the end of this list stays visible. Defaults to ['hide', 'settings', 'close']. A chart drawing a study's row adds the pane's own controls to it: on the first row of a pane other than the price pane it puts up, down, collapse and maximize before close (last when the row has none), and it leaves out close or settings where the study's policy refuses them.

collapsed?: boolean

Rendered as collapsed (the collapse glyph points the other way).

color?: string

Swatch color; omitted draws no swatch.

font?: number

Text size in media px. Default 11.

hasOpenInterest?: boolean

Explicit false suppresses OI without discarding its saved switch. Set by an owning chart.

hidden?: boolean

Rendered as hidden (dimmed, eye hollow).

iconSize?: number

Square side of one action button in media px. Default 16.

The row grows to hold it, so raising this moves every legend row below it down by the same amount and nothing overlaps. It is a chart-wide setting for that reason: two legends on one pane with different button sizes would stack against different row heights and collide.

id: string

Stable id; buttons hit-test as ${id}::close etc.

left?: number

Left inset from the plot edge in media px. Default 8.

maximized?: boolean

Rendered as maximized (the maximize glyph becomes restore).

params?: string

Dimmed parameter summary after the title, e.g. 14 close.

row?: number

Vertical slot on the pane (0 = topmost).

Host-supplied status-line data (logo, names, market state, day change).

Per-field status-line switches. Patching merges field by field.

title: string

Bold source name, e.g. RSI.

top?: number

Top inset in media px. Default 6.

valueColor?: string

Color for the live value. Defaults to color, then the theme's text, so a row can tint its reading (an up/down change) without being forced to show a swatch in that same color.

visible?: boolean

False removes this row and its hit areas. Independent of the dimmed study visibility state.