Skip to content

ChartStaticText.FontSize

property · ChartStaticText · cAlgo.API Since 5.2

DesktopCLICloud

Gets or sets the font size of text

Environment behaviour

CLI — works differently. Created and kept with all its properties, but never drawn: the CLI displays no chart.

Cloud — works differently. Created and kept with all its properties, but never drawn: the cloud displays no chart.

Definition

double FontSize {get; set;}
chartStaticText.FontSize: float

Returns double

Examples

var text = Chart.DrawStaticText("info", SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);
text.FontSize = 16;
Print("Static text font size: {0}", text.FontSize);
text = api.Chart.DrawStaticText("info", api.SymbolName, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)
text.FontSize = 16
api.Print(f"Static text font size: {text.FontSize}")