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

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

# ChartTypeEventArgs.Chart

Member of [ChartTypeEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/ChartTypeEventArgs/index.md).

## Chart

Gets the chart.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: Never raised in the cloud: the events that pass it never fire there (Chart.ChartTypeChanged).

C#:

```csharp
public Chart Chart {get;}
```

Python:

```python
chartTypeEventArgs.Chart: Chart
```

### Returns

`Chart` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.ChartTypeChanged += OnChartTypeChanged;
}

private void OnChartTypeChanged(ChartTypeEventArgs args)
{
    if (args.Chart.ChartType != ChartType.Candlesticks)
        Print("Chart {0} switched to {1}", args.Chart.SymbolName, args.Chart.ChartType);
}
```

Python:

```python
def on_start(self):
    api.Chart.ChartTypeChanged += self.on_chart_type_changed

def on_chart_type_changed(self, args):
    if args.Chart.ChartType != ChartType.Candlesticks:
        api.Print(f"Chart {args.Chart.SymbolName} switched to {args.Chart.ChartType}")
```

