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

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

# Shape.StrokeDashArray

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

## StrokeDashArray

Gets or sets a collection of Double values that indicate the pattern of dashes and gaps that is used to outline shapes.

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[] StrokeDashArray {get; set;}
```

Python:

```python
shape.StrokeDashArray: list[float]
```

### Returns

`double[]` — 

### Examples

C#:

```csharp
var line = new Line { X1 = 0, Y1 = 20, X2 = 300, Y2 = 20, StrokeColor = Color.Gray, StrokeThickness = 2 };
line.StrokeDashArray = new double[] { 4, 2 };
Chart.AddControl(line);
```

Python:

```python
line = Line()
line.Y1 = 20
line.X2 = 300
line.Y2 = 20
line.StrokeColor = Color.Gray
line.StrokeThickness = 2
line.StrokeDashArray = [4.0, 2.0]
api.Chart.AddControl(line)
```

