Skip to content

ChartText.VerticalAlignment

property · ChartText · cAlgo.API

DesktopCLICloud

Gets or sets the vertical alignment of the text regarding the anchor point.

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

VerticalAlignment VerticalAlignment {get; set;}
chartText.VerticalAlignment: VerticalAlignment

Returns VerticalAlignment

Examples

var text = Chart.DrawText("label", "High", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);
text.VerticalAlignment = VerticalAlignment.Top;
Print("Text vertical alignment: {0}", text.VerticalAlignment);
text = api.Chart.DrawText("label", "High", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)
text.VerticalAlignment = VerticalAlignment.Top
api.Print(f"Text vertical alignment: {text.VerticalAlignment}")