Skip to main content

types.RuntimeLine#

Describes a single line in RuntimeOutput.lines.

SYNTAX#

interface RuntimeLine { name: string; values: (number | null)[]; color: string; width?: number; style?: 'solid' | 'dashed' | 'dotted'; }

ARGUMENTS#

  • name (string) — Display name shown in the legend; also referenced by RuntimeFill.topLine / bottomLine.
  • values ((number | null)[]) — Per-bar values. Length equals candles.length.
  • color (string) — CSS color (hex #26a69a, rgb, or named).
  • width (number) — Line width in pixels. Default 1.5.
  • style (string) — solid (default), dashed, or dotted.

RETURNS#

Type definition.

REMARKS#

There is no opacity property on lines — encode transparency in color with rgba(...) or 8-digit #RRGGBBAA hex (fills have an opacity field; lines do not). When emitting via plot(), style and width are fixed at first emission for a given series name.

EXAMPLE#

{ name: 'RSI', values: rsiValues, color: '#a78bfa', width: 2, style: 'solid' }

SEE ALSO#

types.RuntimeOutput, types.RuntimeFill