---
id: "P:cAlgo.API.Line.X1"
kind: "property"
type: "T:cAlgo.API.Line"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/X1/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Line.X1

Member of [Line](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Line/index.md).

## X1

Gets or sets x-axis point 1 data.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public double X1 {get; set;}
```

Python:

```python
line.X1: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
var line = new Line { X1 = 20, Y1 = 50, X2 = 220, Y2 = 50, StrokeColor = Color.Red };
Chart.AddControl(line);
Print("Line starts at x: {0}", line.X1);
```

Python:

```python
line = Line()
line.X1 = 20
line.Y1 = 50
line.X2 = 220
line.Y2 = 50
line.StrokeColor = Color.Red
api.Chart.AddControl(line)
api.Print(f"Line starts at x: {line.X1}")
```

