Skip to main content
A newer version of this page is available. .

CrosshairHintBehavior.LabelPosition Property

Gets or sets the position of the crosshair label on the chart.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

Declaration

public CrosshairLabelPositionBase LabelPosition { get; set; }

Property Value

Type Description
CrosshairLabelPositionBase

The position of the crosshair label on the chart.

Remarks

The crosshair label position can be:

  • Line tracking — follows the cursor. The default option.
  • Static — is fixed in the specific point of the chart. If you set the label position to static, it will be located in upper right corner of the chart. You can adjust the horizontal and the vertical alignment of the static crosshair label.

Example

This example demonstrates how to configure the crosshair cursor behavior and appearance.

<dxc:ChartView.Hint>
    <dxc:Hint Enabled="True" ShowMode="OnTap">
        <!--...-->
        <dxc:Hint.Behavior>
            <dxc:CrosshairHintBehavior GroupHeaderVisible="True"
                                       GroupHeaderTextPattern="{} Year: {A$YYYY}"
                                       ArgumentLabelVisible="True" ArgumentLineVisible="True"
                                       ValueLabelVisible="True" ValueLineVisible="True"
                                       HighlightPoint="True"
                                       MaxSeriesCount="3">
                <dxc:CrosshairHintBehavior.LabelPosition>
                    <dxc:StaticCrosshairLabelPosition />
                </dxc:CrosshairHintBehavior.LabelPosition>
            </dxc:CrosshairHintBehavior>
        </dxc:Hint.Behavior>
    </dxc:Hint>
<dxc:ChartView.Hint>

The CrosshairHintBehavior class provides the following properties to configure the crosshair cursor elements:

Property

Description

ArgumentLabelVisible

Gets or sets whether the argument label is visible on the chart.

ArgumentLineVisible

Gets or sets whether the argument line is visible on the chart.

GroupHeaderTextPattern

Gets or sets the text pattern for the group header of the crosshair label.

GroupHeaderVisible

Gets or sets whether the group header is visible inside the crosshair label.

HighlightPoint

Specifies whether the chart highlights the series point when the crosshair cursor hovers over it.

LabelPosition

Gets or sets the position of the crosshair label on the chart.

MaxSeriesCount

Gets or sets the highest number of series listed in the crosshair label.

ValueLabelVisible

Gets or sets whether the value label is visible on the chart.

ValueLineVisible

Gets or sets whether the value line is visible on the chart.

CrosshairHintBehavior Properties

See Also