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

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

# ChartMouseEventArgs.ChartArea

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

## ChartArea

Gets the chart area.

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

- CLI: Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).
- Cloud: Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseDown, ChartArea.MouseEnter, ChartArea.MouseLeave and more).

C#:

```csharp
public ChartArea ChartArea {get;}
```

Python:

```python
chartMouseEventArgs.ChartArea: ChartArea
```

### Returns

`ChartArea` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.MouseDown += OnChartMouseDown;
}

private void OnChartMouseDown(ChartMouseEventArgs args)
{
    var areaName = args.ChartArea == args.Chart ? "main area" : "indicator area";
    Print("Clicked on the {0}, area height: {1}", areaName, args.ChartArea.Height);
}
```

Python:

```python
def on_start(self):
    api.Chart.MouseDown += self.on_chart_mouse_down

def on_chart_mouse_down(self, args):
    api.Print(f"Clicked on an area with height: {args.ChartArea.Height}, top Y: {args.ChartArea.TopY}, bottom Y: {args.ChartArea.BottomY}")
```

