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

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

# ChartGannBase (interface)

Represents the Gann tools options.

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 ChartGannBase
```

Available since cAlgo.API 5.6.

## Examples

C#:

```csharp
ChartGannBase gann = Chart.DrawGannFan("gannFan", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);
gann.DisplayPrices = true;
gann.Thickness = 2;
Print("Gann levels: {0} | From {1} to {2}", gann.GannLevels.Count, gann.Time1, gann.Time2);
```

Python:

```python
gann = api.Chart.DrawGannFan("gannFan", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)
gann.DisplayPrices = True
gann.Thickness = 2
api.Print(f"Gann levels: {gann.GannLevels.Count} | From {gann.Time1} to {gann.Time2}")
```

## Properties

- `Color Color {get; set;}` — Gets or sets the lines color. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Color/index.md)
- `bool DisplayPrices {get; set;}` — Defines if the Gann levels display the prices [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/DisplayPrices/index.md)
- `IReadonlyList<GannLevel> GannLevels {get;}` — Gets the Gann levels. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/GannLevels/index.md)
- `LineStyle LineStyle {get; set;}` — Gets or sets the lines style. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/LineStyle/index.md)
- `int Thickness {get; set;}` — Gets or sets the lines thickness. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Thickness/index.md)
- `DateTime Time1 {get; set;}` — Gets or sets the first point time value on the Time line. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time1/index.md)
- `DateTime Time2 {get; set;}` — Gets or sets the second point time value on the Time line. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time2/index.md)
- `double Y1 {get; set;}` — Gets or sets the first point value on the Y-axis. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y1/index.md)
- `double Y2 {get; set;}` — Gets or sets the second point value on the Y-axis. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y2/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)

