Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Providing Data
   [Expand]Appearance Customization
   [Collapse]End-User Features
    [Expand]Basic End-User Interaction
    [Collapse]Crosshair Cursor
      Overview
      Crosshair Cursor Customization
      Changing the Crosshair Cursor Layout
     Tooltips
    [Expand]Animation
     Printing and Exporting
     Chart Designer for End-Users
     Integration with a Range Control
     Chart Wizard for End-Users
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Overview

The crosshair cursor provides a great level of interactivity by allowing you to track series point coordinates on a chart. It is also used for analyzing data when you need to compare different graphs.

The crosshair cursor is represented by a pair of intersecting horizontal and vertical lines (the value line and the argument line) with the corresponding axis labels (the value labels and the argument labels) at the end of the lines. The crosshair argument line is visible only by default.

See the Crosshair Cursor Customization section to learn how to show the entire crosshair cursor on a chart.

A cursor also contains a label (the crosshair label), which is positioned at the intersection of the lines. This label is also visible and shows the current series point argument and value by default.

Note

When you hover over a series data point using either a mouse or your finger, it is highlighted automatically, thanks to the CrosshairOptions.HighlightPoints property (which is set to true by default).

In addition, it is possible to highlight series data points at the series level using the SeriesBase.CrosshairHighlightPoints property.

To support series points highlighting, data point markers are hidden in the WinForms Chart Control by default. If you wish to display markers on a diagram, set the MarkerVisibility property for a particular series to true (e.g., LineSeriesView.MarkerVisibility).

When your chart contains two or more series, the crosshair cursor label has the following appearance:

As you can see, each crosshair label contains a group header that helps to operate with numerous data. If you wish to hide the group header, set the CrosshairOptions.ShowGroupHeaders property to false.

Note

If a series name is not displayed on a crosshair label, you need to specify it using the Series.Name property.

A crosshair cursor is enabled by default. This means that you do not need to write any code to add it to a chart. If you wish to deactivate a crosshair cursor, you can do one of the following:

The following image illustrates the second approach to disabling a crosshair cursor for the Americas Spline series only.

Note

In the image above, group headers of the crosshair cursor were formatted using the CrosshairOptions.GroupHeaderPattern property set to the "Group: {A}" value. See the Crosshair Cursor Customization section to learn more.

In addition, you can show the Crosshair cursor programmatically using the XYDiagram2D.ShowCrosshair method. For example, the following code demonstrates how to show the Cursor programmatically on the Control.MouseUp event of the Chart Control.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T466140.

If you need an alternative tool to operate with data, you can use tooltips.

See the Tooltips topic to learn more.

Expanded See Also

How would you rate this topic?​​​​​​​