Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.table.set_bgcolor
On this pageSignatureParametersReturnsExample

Drawing / Reference

alerta.table.set_bgcolor

TradingView-compatible spelling: table.set_bgcolor, runs without warnings

Sets the table's background color. It colors every cell without a background of its own — also the cells made before the call — while cells given their own bgcolor keep it. na removes the background.

alerta.table.set_bgcolor(table_id, bgcolor) → void

Parameters

NameTypeRequiredDefaultDescription
table_idtableYes—Table handle.
bgcolorcolorYes—Background color.

Returns

void

Example

alerta.table.set_bgcolor
var t = table.new("top_right", 2, 2)table.set_bgcolor(t, color.new(color.black, 80))if barstate.islast    table.cell(t, 0, 0, "Styled cell", text_color=chart.fg_color)    table.cell(t, 1, 0, "Second cell", text_color=chart.fg_color)

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.