# Selection

The Chart category axis enables users to select a specific range by clicking, dragging, resizing, or scrolling with the mouse wheel.

The following example demonstrates a range selection and a selection that filters data in the main pane.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/elements/selection/overview/source.txt)

## Enabling Selection

To enable the selection, set the [`select`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent) configuration on the category axis item. The `from` and `to` properties define the initial selected range through zero-based category indices.

> Selection is supported only for horizontal category axes.

```html
<kendo-chart-category-axis>
    <kendo-chart-category-axis-item
        [categories]="months"
        [select]="{ from: 3, to: 8 }"
    >
    </kendo-chart-category-axis-item>
</kendo-chart-category-axis>
```

Use the [`selectEnd`](https://www.telerik.com/kendo-angular-ui/components/charts/api/chartcomponent#selectend) event to react when the user changes the selection. The event provides the updated `from` and `to` indices.

The following example demonstrates how to enable the selection and display the selected range.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/elements/selection/source.txt)

## Configuring the Selection Options

The [`select`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent) configuration provides the following options to control the selection behavior:

* [`from`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent#from) and [`to`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent#to)—Set the lower and upper boundaries of the selected range.
* [`min`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent#min) and [`max`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent#max)—Limit the range that the user can select. The selection handles cannot move beyond these boundaries.
* [`mousewheel`](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent#mousewheel)—Configure the mouse wheel behavior. Set `zoom` to `both`, `left`, or `right` to control the zoom direction. Set `reverse` to `true` to invert the scroll direction.

The following example demonstrates how to configure the selection options.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/elements/selection/configurator/source.txt)

## Filtering Data with Navigator Selection

You can use the selection to filter data in another pane, similar to the [Stock Chart](https://www.telerik.com/kendo-angular-ui/components/charts/stock-chart) navigator. Add a second pane with its own category axis and bind both axes to the same data. Use the [`selectEnd`](https://www.telerik.com/kendo-angular-ui/components/charts/api/chartcomponent#selectend) event to update the `min` and `max` of the main axis.

The following example demonstrates how to filter the main pane data through the selection.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/charts/elements/selection/navigator/source.txt)

## Support and Learning Resources

* [Getting Started with the Kendo UI for Angular Chart](https://www.telerik.com/kendo-angular-ui/components/charts/installation/getting-started)
* [API Reference of the Chart](https://www.telerik.com/kendo-angular-ui/components/charts/api)
* [CategoryAxisSelectComponent API](https://www.telerik.com/kendo-angular-ui/components/charts/api/categoryaxisselectcomponent)
* [Axes](https://www.telerik.com/kendo-angular-ui/components/charts/elements/axes)
* [Chart Area](https://www.telerik.com/kendo-angular-ui/components/charts/elements/chart-area)
* [Crosshairs](https://www.telerik.com/kendo-angular-ui/components/charts/elements/crosshairs)
* [Error Bars](https://www.telerik.com/kendo-angular-ui/components/charts/elements/error-bars)
* [Labels](https://www.telerik.com/kendo-angular-ui/components/charts/elements/labels)
* [Legend](https://www.telerik.com/kendo-angular-ui/components/charts/elements/legend)
* [Notes](https://www.telerik.com/kendo-angular-ui/components/charts/elements/notes)
* [Panes](https://www.telerik.com/kendo-angular-ui/components/charts/elements/panes)
* [Plot Area](https://www.telerik.com/kendo-angular-ui/components/charts/elements/plot-area)
* [Plot Bands](https://www.telerik.com/kendo-angular-ui/components/charts/elements/plot-bands)
* [Series](https://www.telerik.com/kendo-angular-ui/components/charts/elements/series)
* [Title](https://www.telerik.com/kendo-angular-ui/components/charts/elements/title)
* [Tooltip](https://www.telerik.com/kendo-angular-ui/components/charts/elements/tooltips)
* [Getting Started with Kendo UI for Angular (Online Guide)](https://www.telerik.com/kendo-angular-ui/components/getting-started)
* [Getting Started with Kendo UI for Angular (Video Tutorial)](https://www.telerik.com/campaigns/kendo-ui/using-kendo-ui-with-angular-video-tutorial)
* [Video Courses](https://www.telerik.com/kendo-angular-ui/components/getting-started/video-onboarding)
* [Chart Forum](https://www.telerik.com/forums/kendo-angular-ui?tagId=256)
* [Before You Start: All Things Angular (Telerik Blog Post)](https://www.telerik.com/blogs/all-things-angular)
* [Knowledge Base](https://www.telerik.com/kendo-angular-ui/components/knowledge-base)

## Additional Resources

* [Angular Blogs](https://www.telerik.com/blogs/tag/kendo-ui-for-angular)
* [Angular Videos](https://www.telerik.com/videos/kendo-angular-ui)
* [Kendo UI for Angular Roadmap](https://www.telerik.com/support/whats-new/kendo-angular-ui/roadmap)
