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) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
table_id | table | Yes | — | Table handle. |
bgcolor | color | Yes | — | Background color. |
Returns
voidExample
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.