This topic provides information about the crosshair layer used for hover interactions. It describes the properties of the crosshair layer and provides an implementation example.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The CrosshairLayer renders as crossing lines intersecting at the actual value of every series that they are configured to target with each series rendering a separate set of lines.
You can configure the CrosshairLayer so that the layer will only display one specific series as by default they target all series on the UltraDataChart control. To achieve this, set the TargetSeries property. For more information on this property, see the Properties section below.
By default, the color of the crosshair lines is a lighter color than the series that it is interacting with. However, this default setting can be overridden so that you can select a color that will be used for the crosshair lines. This is done by setting the Brush property. For more information on this property see the Common Properties topic.
The following image is a preview of the UltraDataChart control rendered with the CrosshairLayer added.
The following table summarizes the properties of the crosshair layer.
The following screenshot illustrates how the UltraDataChart control with the TargetSeries property of the CrosshairLayer object looks configured using the following setting:
Following is the code used in this implementation
In C#:
var crosshairLayerSeries = new CrossHairLightLayer(); crosshairLayerSeries.TargetSeries = series1; chart.Series.Add(crosshairLayerSeries);
In Visual Basic:
Dim crosshairLayerSeries As new CrossHairLightLayer() crosshairLayerSeries.TargetSeries = series1 chart.Series.Add(crosshairLayerSeries)