Skip to main content

Hint.Behavior Property

Gets or sets the behavior of the hint.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

NuGet Package: DevExpress.XamarinForms.Charts

Declaration

public HintBehavior Behavior { get; set; }

Property Value

Type Description
HintBehavior

The hint behavior.

Remarks

The Hint provides the following behaviors that manage how the chart displays the hint:

Tooltip Behavior

The chart shows the hint as a tooltip:

Tooltip hint

Note

The Tooltip requests data to display from a series. The series provides the Series.HintOptions property to configure what data the series returns.

The following code configures this hint behavior and manages how the hint interacts with this series:

<dxc:ChartView>
    <dxc:ChartView.Hint>
        <dxc:Hint>
            <dxc:Hint.Behavior>
                <dxc:TooltipHintBehavior/>
            </dxc:Hint.Behavior>
        </dxc:Hint>
    </dxc:ChartView.Hint>
    <dxc:ChartView.Series>
        <dxc:BarSeries>
            <dxc:BarSeries.HintOptions>
                <dxc:SeriesHintOptions PointTextPattern="{}{S}, {A}: {V$0.##}"/>
            </dxc:BarSeries.HintOptions>
        </dxc:BarSeries>
    </dxc:ChartView.Series>
</dxc:ChartView>

The code above utilizes the following classes and properties:

Symbols

Description

Hint.Behavior

Gets or sets the behavior of the hint.

TooltipHintBehavior

Defines the tooltip behavior.

Series.HintOptions

SeriesHintOptions

Stores the series’ tooltip settings.

Crosshair Cursor Behavior

The chart shows the hint as the Crosshair Cursor:

Crosshair Cursor hint

Note

The Crosshair Cursor requests data to display from a series and axes. The series provides the Series.HintOptions property to configure what data the series returns. The AxisBase.HintOptions property manages how the hint interacts with the axis.

The following code configures this hint behavior and manages how the hint interacts with the series and axes:

<dxc:ChartView>
    <dxc:ChartView.Hint>
        <dxc:Hint>
            <dxc:Hint.Behavior>
                <dxc:CrosshairHintBehavior GroupHeaderTextVisible="False"/>
            </dxc:Hint.Behavior>
        </dxc:Hint>
    </dxc:ChartView.Hint>
    <dxc:ChartView.AxisY>
        <dxc:NumericAxisY>
            <dxc:NumericAxisY.HintOptions>
                <dxc:AxisHintOptions LineVisible="False" LabelVisible="False"/>
            </dxc:NumericAxisY.HintOptions>
        </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>
    <dxc:ChartView.Series>
        <dxc:BarSeries>
            <dxc:BarSeries.HintOptions>
                <dxc:SeriesCrosshairOptions PointTextPattern="{}{S}, {A}: {V$0.##}"/>
            </dxc:BarSeries.HintOptions>
        </dxc:BarSeries>
    </dxc:ChartView.Series>
</dxc:ChartView>

The markup above uses the classes and properties below:

Symbols

Description

Hint.Behavior

Gets or sets the behavior of the hint.

CrosshairHintBehavior

Defines the crosshair hint behavior.

Series.HintOptions

SeriesCrosshairOptions

Stores the series’ crosshair cursor settings.

AxisBase.HintOptions

Gets or sets an object that configures how the axis interacts with the Hint.

AxisHintOptions

Stores settings that specify how the axis interacts with the crosshair cursor.

See Also