---
id: "T:cAlgo.API.ChartShape"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/"
---

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

# ChartShape (interface)

Represents the Shape chart object. Allows drawing a Rectangle, a Triangle, and an Ellipse on the chart.

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.

## Definition

```csharp
public interface ChartShape
```

## Examples

C#:

```csharp
ChartShape shape = Chart.DrawRectangle("zone", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue));
shape.IsFilled = true;
shape.LineStyle = LineStyle.Dots;
Print("Shape: {0} | Filled: {1}", shape.Name, shape.IsFilled);
```

Python:

```python
shape = api.Chart.DrawRectangle("zone", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue))
shape.IsFilled = True
shape.LineStyle = LineStyle.Dots
api.Print(f"Shape: {shape.Name} | Filled: {shape.IsFilled}")
```

## Properties

- `Color Color {get; set;}` — Gets or sets the line color. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/Color/index.md)
- `bool IsFilled {get; set;}` — Defines if the shape is filled. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/IsFilled/index.md)
- `LineStyle LineStyle {get; set;}` — Gets or sets the line style. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/LineStyle/index.md)
- `int Thickness {get; set;}` — Gets or sets the line thickness. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Shapes/ChartShape/Thickness/index.md)

## Inherited members

- `string Name {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Name/index.md)
- `string Comment {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Comment/index.md)
- `ChartObjectType ObjectType {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/index.md)
- `bool IsInteractive {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsInteractive/index.md)
- `bool IsLocked {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsLocked/index.md)
- `bool IsHidden {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsHidden/index.md)
- `int ZIndex {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ZIndex/index.md)
- `bool IsAlive {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsAlive/index.md)

