Makes the text inside a box bold, italic, both or plain.
Use text.format_bold, text.format_italic or text.format_none, or join bold and italic with +. The setting covers the whole string of the box.
Color and size are controlled separately.
Syntax
box.set_text_formatting(id: series box, text_formatting: series text_format) -> void
box.set_text_formatting(text_formatting: series text_format) -> voidArguments
| Name | Type | Default | Description |
|---|---|---|---|
| id | series box | required | The box whose text formatting changes. |
| text_formatting | series text_format | required | text.format_none (default), text.format_bold or text.format_italic; join bold and italic with +. |
Returns
Nothing.
Remarks
- On Sidechair: formatting is not applied yet, so a call reports a warning and the text stays plain.
Example
//@version=6
indicator("box.set_text_formatting: bold italic", overlay = true)
if barstate.islast
z = box.new(bar_index - 10, high, bar_index, low, bgcolor = color.new(color.red, 88), text = "Supply", text_color = color.red)
box.set_text_formatting(z, text.format_bold + text.format_italic)See also
Not on Sidechair yet