Sets a cell's height as a percent of the chart height; 0 lets the text decide.
A value of 5 makes the cell a twentieth of the chart's height. 0 restores automatic height, sized to the text.
Cells in one row share a height. A very small value on an empty, filled cell turns a row into a thin divider between two blocks of text.
Syntax
table.cell_set_height(table_id: series table, column: series int, row: series int, height: series int/float (optional)) -> void
table.cell_set_height(column: series int, row: series int, height: series int/float (optional)) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| table_id | series table | required | The table that holds the cell whose height is set. |
| column | series int | required | Column of the cell whose height is set, counting from 0 at the left. |
| row | series int | required | Row of the cell whose height is set, counting from 0 at the top. |
| height | series int/ | 0 | Height as a percent of the chart height, for example 5. 0, the default, fits the text. |
Returns
Nothing.
Example
//@version=6
indicator("table.cell_set_height: divider row", overlay = true)
var t = table.new(position.top_left, 1, 3)
if barstate.islast
table.cell(t, 0, 0, "Range")
table.cell(t, 0, 1, "", bgcolor = color.gray)
table.cell_set_height(t, 0, 1, 0.5)
table.cell(t, 0, 2, str.tostring(high - low, "#.##"))See also
Runs on Sidechair