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

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

# Line.Y1

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

## Y1

Gets or sets the y-axis point 2 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 Y1 {get; set;}
```

Python:

```python
line.Y1: float
```

### Returns

`double` — 

### Examples

C#:

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

Python:

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

