---
id: "P:cAlgo.API.ChartVerticalLine.LineStyle"
kind: "property"
type: "T:cAlgo.API.ChartVerticalLine"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/LineStyle/"
---

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

# ChartVerticalLine.LineStyle

Member of [ChartVerticalLine](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartVerticalLine/index.md).

## LineStyle

Gets or sets the line style.

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: Created and kept with all its properties, but never drawn: the CLI displays no chart.
- Cloud: Created and kept with all its properties, but never drawn: the cloud displays no chart.

C#:

```csharp
LineStyle LineStyle {get; set;}
```

Python:

```python
chartVerticalLine.LineStyle: LineStyle
```

### Returns

`LineStyle` — 

### Examples

C#:

```csharp
var line = Chart.DrawVerticalLine("sessionStart", Bars.OpenTimes.LastValue, Color.Gray);
line.LineStyle = LineStyle.DotsVeryRare;
Print("Vertical line style: {0}", line.LineStyle);
```

Python:

```python
line = api.Chart.DrawVerticalLine("sessionStart", api.Bars.OpenTimes.LastValue, Color.Gray)
line.LineStyle = LineStyle.DotsVeryRare
api.Print(f"Vertical line style: {line.LineStyle}")
```

