Places a cell's text against its top edge, center or bottom edge.
text.align_top, text.align_center and text.align_bottom set where the text sits in the cell's height. It matters once the row is taller than the text, for example after table.cell_set_height().
Giving every cell in a row the same value keeps text of different sizes on a shared line.
Syntax
table.cell_set_text_valign(table_id: series table, column: series int, row: series int, text_valign: series string (optional)) -> void
table.cell_set_text_valign(column: series int, row: series int, text_valign: series string (optional)) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| table_id | series table | required | The table that holds the cell whose text is aligned. |
| column | series int | required | Column of the cell whose text is aligned, counting from 0 at the left. |
| row | series int | required | Row of the cell whose text is aligned, counting from 0 at the top. |
| text_valign | series string | text. | Vertical placement: text.align_top, text.align_center (default) or text.align_bottom. |
Returns
Nothing.
Example
//@version=6
indicator("table.cell_set_text_valign: bottom", overlay = true)
var t = table.new(position.top_right, 1, 1)
if barstate.islast
table.cell(t, 0, 0, "Note", height = 8)
table.cell_set_text_valign(t, 0, 0, text.align_bottom)See also
Runs on Sidechair