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

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

# ChartHorizontalLine.LineStyle

Member of [ChartHorizontalLine](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/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
chartHorizontalLine.LineStyle: LineStyle
```

### Returns

`LineStyle` — 

### Examples

C#:

```csharp
var line = Chart.DrawHorizontalLine("support", Bars.LowPrices.LastValue, Color.Green);
line.LineStyle = LineStyle.LinesDots;
Print("Support line style: {0}", line.LineStyle);
```

Python:

```python
line = api.Chart.DrawHorizontalLine("support", api.Bars.LowPrices.LastValue, Color.Green)
line.LineStyle = LineStyle.LinesDots
api.Print(f"Support line style: {line.LineStyle}")
```

