---
id: "E:cAlgo.API.ChartArea.MouseWheel"
kind: "event"
type: "T:cAlgo.API.ChartArea"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/ChartArea/MouseWheel/"
---

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

# ChartArea.MouseWheel

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

## MouseWheel

Occurs when the mouse wheel button is rotated.

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

- CLI: Never raised: no chart is displayed, so there is nothing to interact with.
- Cloud: Never raised: no chart is displayed, so there is nothing to interact with.

C#:

```csharp
event Action<ChartMouseWheelEventArgs> MouseWheel;
```

Python:

```python
chartArea.MouseWheel += handler  # handler(obj: ChartMouseWheelEventArgs)
```

### Returns

`Action<ChartMouseWheelEventArgs>` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    Chart.MouseWheel += OnChartMouseWheel;
}

private void OnChartMouseWheel(ChartMouseWheelEventArgs args)
{
    Print("Mouse wheel delta: {0}", args.Delta);
}
```

Python:

```python
def on_start(self):
    api.Chart.MouseWheel += self.on_chart_mouse_wheel

def on_chart_mouse_wheel(self, args):
    api.Print(f"Mouse wheel delta: {args.Delta}")
```

