Crosshairs
The Chart crosshairs are lines perpendicular to the axes. They enable the user to see the exact value at the current cursor position in their tooltip. Crosshairs are available for all axis types—Category, Value, X, Y, and Navigator.
The following example demonstrates crosshairs for all axis types.
Enabling Crosshairs
To enable the crosshair for an axis, either add the corresponding crosshair component or set the crosshair.visible option to true.
The following example demonstrates how to enable the crosshairs. The category axis uses the component to enable the crosshair and its tooltip, the value axis uses an object to define the settings.
Customizing Crosshairs
You can control the crosshair appearance through the following properties:
color—Specifies the color of the crosshair.dashType—Defines the dash type of the crosshair. The default value issolid.width—Sets the width of the crosshair in pixels. The default value is1.opacity—Specifies the opacity of the crosshair. By default, the crosshair is opaque.tooltip—Configures the tooltip of the crosshair.
The following example demonstrates how to customize the crosshairs.
Getting Current Cursor Values
To get the current hovered values, use the plotAreaHover event.
The following example demonstrates how to get the hovered values.
Support and Learning Resources
- Chart Crosshairs Homepage
- Getting Started with the Kendo UI for Angular Chart
- API Reference of the Chart
- Axes
- Chart Area
- Error Bars
- Labels
- Legend
- Notes
- Panes
- Plot Area
- Plot Bands
- Selection
- Series
- Title
- Tooltip
- Getting Started with Kendo UI for Angular (Online Guide)
- Getting Started with Kendo UI for Angular (Video Tutorial)
- Video Courses
- Chart Forum
- Before You Start: All Things Angular (Telerik Blog Post)
- Knowledge Base