# Events

This article lists the events exposed by the charting controls and their series.

* [Chart controls events](https://www.telerik.com/products/wpf/documentation/controls/radchartview/events#chart-controls-events)
* [Series events](https://www.telerik.com/products/wpf/documentation/controls/radchartview/events#series-events)
* [Axis events](https://www.telerik.com/products/wpf/documentation/controls/radchartview/events#axis-events)
* [Behavior events](https://www.telerik.com/products/wpf/documentation/controls/radchartview/events#behavior-events)
* [Provider events](https://www.telerik.com/products/wpf/documentation/controls/radchartview/events#provider-events)

## Chart Controls Events

**All charting controls** in the RadChartView suite work with the following events:

* **PlotAreaClipChanged**: Occurs when the chart's plot area gets changed.
* **UIUpdated**: Occurs when the chart's UI gets updated.

The following events will be fired only for **RadCartesianChart**:

* **PanOffsetChanged**: Occurs when the chart pan offset gets changed.
  **Example 1: PanOffsetChanged event arguments**
  ```C#
  private void RadCartesianChart_PanOffsetChanged(object sender, ChartPanOffsetChangedEventArgs e)
  {
      Point previousPanOffset = e.PreviousPanOffset;
      Point newPanOffset = e.NewPanOffset;
  }
  ```

* **ZoomChanged**: Occurs when the chart zoom gets changed.
  **Example 2: ZoomChanged event arguments**
  ```C#
  private void RadCartesianChart_ZoomChanged(object sender, ChartZoomChangedEventArgs e)
  {
      Size previousZoom = e.PreviousZoom;
      Size newZoom = e.NewZoom;
  }
  ```

## Series Events

All chart series expose the following events:

* **DataBindingComplete**: Occurs when a databinding operation has been successfully completed.
* **SeriesAnimationCompleted**:  This event is fired when the animation for all datapoints of the series is completed.
* **PointAnimationCompleted**: This event is fired when the animation of the series is completed.

## Axis Events

The **LinearAxis, LogarithmicAxis, DateTimeContinuousAxis** continuous axes of the charts expose the following events

* **ActualRangeChanged**: Occurs when the actual range changes.
  **Example 3: ActualRangeChanged event arguments**
  ```C#
  private void DateTimeContinuousAxis_ActualRangeChanged(object sender, Telerik.Charting.DateTimeRangeChangedEventArgs e)
  {
      Telerik.Charting.ValueRange<System.DateTime> previousRange = e.PreviousRange;
      Telerik.Charting.ValueRange<System.DateTime> newRange = e.NewRange;
  }
  ```

* **ActualVisibleRangeChanged**: Occurs when the actual visible range changes.
  **Example 4: ActualVisibleRangeChanged event arguments**
  ```C#
  private void DateTimeContinuousAxis_ActualVisibleRangeChanged(object sender, Telerik.Charting.DateTimeRangeChangedEventArgs e)
  {
      Telerik.Charting.ValueRange<System.DateTime> previousRange = e.PreviousRange;
      Telerik.Charting.ValueRange<System.DateTime> newRange = e.NewRange;
  }
  ```

The **LinearAxis** has an additional event which will be fired when the MajorStep property is changed.

* **ActualMajorStepChanged**: Occurs when the major step of the axis gets changed.

> You can find more information about the axes events in the [Axis](https://www.telerik.com/products/wpf/documentation/controls/radchartview/axes/axis#common-events) help article.

## Behavior Events

* **ChartCrosshairBehavior**: This behavior exposes the following event:

  * **PositionChanged**: Occurs when the position of the lines that represent the crosshair change.

  **Example 5: PositionChanged event arguments**

  ```C#
  private void ChartCrosshairBehavior_PositionChanged(object sender, ChartCrosshairPositionChangedEventArgs e)
  {
      Telerik.Charting.DataTuple data = e.Data;
      Point newPosition = e.Position;
  }
  ```

* **ChartTrackBallBehavior**: This behavior exposes the following events:

  * **PositionChanging**: Occurs when the value of the ChartTrackBallBehavior.Position property is changing. Allows for the new position to be modified.

  **Example 6: PositionChanging event arguments**

  ```C#
  private void ChartTrackBallBehavior_PositionChanging(object sender, TrackBallPositionChangingEventArgs e)
  {
      var previousPosition = e.PreviousPosition;
      var newPosition = e.NewPosition;
  }
  ```

  * **TrackInfoUpdated**: Occurs when a track info is updated, just before the UI that represents it is updated. Allows custom information to be displayed.

  **Example 6: TrackInfoUpdated event arguments**

  ```C#
  private void ChartTrackBallBehavior_TrackInfoUpdated(object sender, TrackBallInfoEventArgs e)
  {
      ChartDataContext context = e.Context;
      object test = e.Header;
  }
  ```

* **ChartSelectionBehavior**: This behavior exposes the following event:

  * **SelectionChanged**: Occurs when the chart selection has changed.

  **Example 7: SelectionChanged event arguments**

  ```C#
  private void ChartSelectionBehavior_SelectionChanged(object sender, ChartSelectionChangedEventArgs e)
  {
      var selectedPoints = e.AddedPoints;
      var unSelectedPoints = e.RemovedPoints;
  }
  ```

## Provider Events

* **ChartSeriesProvider**: The series provider exposes the following events:

  * **SeriesCreated**: Occurs when a series is created. Allows for the series to be additionally set up or completely replaced.

  **Example 8: SeriesCreated event arguments**

  ```C#
  private void ChartSeriesProvider_SeriesCreated(object sender, ChartSeriesCreatedEventArgs e)
  {
      object test = e.Context;
      ChartSeries createdSeries = e.Series;
  }
  ```

* **ChartAnnotationsProvider**: The annotations provider exposes the following events:
  * **AnnotationCreated**: Occurs when an annotation is created. Allows for the annotation to be additionally set up or completely replaced.
  **Example 9: AnnotationCreated event arguments**
  ```C#
  private void ChartAnnotationsProvider_AnnotationCreated(object sender, ChartAnnotationCreatedEventArgs e)
  {
      object test = e.Context;
      ChartAnnotation createdAnnotation = e.Annotation;
  }
  ```

## See Also

* [Getting Started](https://www.telerik.com/products/wpf/documentation/controls/radchartview/getting-started/introduction)
* [ChartSelectionBehaviors](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/behaviors/selection)
* [AnnotationsProvider](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/annotations/annotations-provider)
* [Dynamic Number Of Series](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/chartseriesprovider)
