# Zooming in C1Chart

## Content



To add zooming behavior in **C1Chart**, use some custom code in the Chart's **MouseWheel** event.

```csharp
private void chart_MouseWheel(object sender, MouseWheelEventArgs e)
{    
      if (Keyboard.Modifiers == ModifierKeys.Control && e.Delta == -120)    
      {
       chart.View.AxisX.Scale += .1;
       chart.View.AxisY.Scale += .1; 
       }
else if (Keyboard.Modifiers == ModifierKeys.Control && e.Delta == 120)
      {
          chart.View.AxisX.Scale -= .1;
          chart.View.AxisY.Scale -= .1;    
          }
} 
```

To enable the user to move the chart around when it’s zoomed, add the following to **C1Chart**’s XAML markup:

```xml
<c1c:C1Chart x:Name="chart" MouseWheel="chart_MouseWheel" >
   <c1c:C1Chart.Actions>
        <c1c:TranslateAction MouseButton="Left" />
   </c1c:C1Chart.Actions>
</c1c:C1Chart>
```

## See Also

[Scaling a Bubble Chart While Zooming](/componentone/docs/wpf/online-chart/overview/ChartFeatures/Interaction/ScalingChartZooming)