draw
Drawings are made in the chart’s handlers; a table may also be made at the top level.(options: LineOptions): Drawing<LineOptions>
(options: BoxOptions): Drawing<BoxOptions>
(options: LabelOptions): Drawing<LabelOptions>
Labels are text only; no markup, links or images.
(options: PolylineOptions): Drawing<PolylineOptions>
(a: Drawing<LineOptions>, b: Drawing<LineOptions>, options?: LinefillOptions): Drawing<LinefillOptions>
Shade between two lines of this script, as drawn (extensions included). The fill goes when
either line is deleted.
(options: TableOptions): Table
At most 9 tables.
Point
A point by time, or by bar number on the chart. Up to 500 bars into the future.LineStyleOptions
Color | null
LineWidth
LineStyle
'none' | 'left' | 'right' | 'both'
Drawing
number
Stable while the drawing exists, including across updates of the forming bar.
(options: Partial<O>): void
(): void
LineOptions
Point
Point
BoxOptions
Point
Point
LineStyleOptions
Color | null
string
Color | null
LabelStyle
How a label sits at its point.up, down, left and right are boxes with a pointer at the
point (an up label sits below it and points up); the corner styles put the box’s corner on
the point; center centres the box on it; none is the text alone. A shape name draws that
shape at the point with the text above it.
LabelOptions
Point
string
LabelStyle
Color | null
Color | null
Size
string
PolylineOptions
readonly Point[]
boolean
Color | null
LinefillOptions
Color | null
TablePosition
TableOptions
TablePosition
Where the table sits in the script’s pane, clear of the legend and the price axis.
number
number
Color | null
Color | null
The lines between cells, and their width in pixels (0 to 4, default 1).
number
Color | null
The outline around the table, and its width in pixels (0 to 4, default 1).
number
TableCellOptions
Color | null
Color | null
Size
'left' | 'center' | 'right'
'top' | 'middle' | 'bottom'
number
The cell’s width as a percent of the pane’s width, 0 to 100. 0, the default, fits the text.
number
The cell’s height as a percent of the pane’s height, 0 to 100. 0, the default, fits the text.
string
Shown when the pointer rests on the cell. Text only, like the cell.
Table
number
(column: number, row: number, text: string, options?: TableCellOptions): void
Text only; no markup, links or images.
(fromColumn: number, fromRow: number, toColumn: number, toRow: number): void
Join the cells from (
fromColumn, fromRow) to (toColumn, toRow) into one, which shows
the first cell’s text and style. Merged areas may not overlap; a later merge that overlaps an
earlier one replaces it.(): void
(): void