Sidechair

size.* constants

Browse the reference

Text and marker sizes: size.auto, size.tiny, size.small, size.normal, size.large and size.huge, from smallest to largest.

Try it in the editor

size.* constants set the size argument of plotshape, plotchar and label.new, and the text_size argument of box.new, table.cell and similar drawing calls. From smallest to largest they run size.tiny, size.small, size.normal, size.large, size.huge. size.auto lets the chart choose a size that fits the current zoom.

The default depends on the function: label.new uses size.normal, while plotshape, plotchar and the text of boxes default to size.auto.

Constants

NameValueDescription
size.autoChosen by the chart to fit the zoom level.
size.hugeThe largest step.
size.largeLarger than normal.
size.normalThe standard size.
size.smallSmaller than normal.
size.tinyThe smallest step.

Remarks

  • Sizes are named steps, not pixel values, and the exact height of each step depends on the chart.

Example

Pine ScriptLabel sizesOpen in editor
//@version=6
indicator("Sizes", overlay = true)
if bar_index % 150 == 0
    label.new(bar_index, high, "tiny", size = size.tiny)
if bar_index % 150 == 50
    label.new(bar_index, high, "normal", size = size.normal)
if bar_index % 150 == 100
    label.new(bar_index, high, "huge", size = size.huge)
plot(close, "Close", color.gray)

See also

Runs on Sidechair