Sets how many pixels thick the inner grid lines are; 0 turns the grid off.
0 hides the inner grid and 1 draws hairlines. All inner lines share one width. The frame around the table has its own width, set with table.set_frame_width().
A line also needs a visible color, so pair a width above 0 with table.set_border_color() or the border_color argument of table.new().
Syntax
table.set_border_width(table_id: series table, border_width: series int (optional)) -> void
table.set_border_width(border_width: series int (optional)) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| table_id | series table | required | The table whose inner grid lines change thickness. |
| border_width | series int | 0 | Thickness of the lines between cells in pixels. 0, the default, draws no inner grid. |
Returns
Nothing.
Example
//@version=6
indicator("table.set_border_width: grid slider", overlay = true)
w = input.int(1, "Grid thickness", minval = 0, maxval = 4)
var t = table.new(position.bottom_right, 2, 2, border_color = color.gray)
if barstate.islast
table.cell(t, 0, 0, "A")
table.cell(t, 1, 1, "B")
table.set_border_width(t, w)See also
Runs on Sidechair