Skip to content

Line.X2

property · Line · cAlgo.API

DesktopCLICloud

Gets or sets the x-axis point 2 data.

Environment behaviour

CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.

Definition

public double X2 {get; set;}
line.X2: float

Returns double

Examples

var line = new Line { X1 = 20, Y1 = 100, X2 = 300, Y2 = 100, StrokeColor = Color.Gray };
line.X2 = Chart.Width / 2;
Chart.AddControl(line);
Print("Line ends at x: {0}", line.X2);
line = Line()
line.X1 = 20
line.Y1 = 100
line.X2 = api.Chart.Width / 2
line.Y2 = 100
line.StrokeColor = Color.Gray
api.Chart.AddControl(line)
api.Print(f"Line ends at x: {line.X2}")