SeriesHintOptions Class

Stores the series' tooltip settings.

Namespace: DevExpress.XamarinForms.Charts

Assembly: DevExpress.XamarinForms.Charts.dll

Declaration

public class SeriesHintOptions :
    SeriesHintOptionsBase

Related API Members

The following members accept/return SeriesHintOptions objects:

Examples

This example demonstrates how to set up the chart so that it shows a tooltip for a series point when a user taps it, and configure a tooltip for each series on the chart.

Line Series Tooltips

  1. Set the chart hint's Behavior property to the TooltipHintBehavior class instance.
  2. Set each series' HintOptions property to the SeriesHintOptions object and use the PointTextPattern property to specify the tooltip text pattern.
    You can use the following placeholders to specify text patterns for tooltips:

    Placeholder

    Description

    {S}

    Displays a series name (DisplayName).

    {A}

    Displays a series point argument.

    {V}

    Displays a series point value.

    NOTE

    To format these values, you can use default format strings after the $ sign.
    For example, in the {V$#.##} string, V is a placeholder, $ is a format string separator, and #.## is a format string.

<ContentPage.Resources>
    <dxc:SeriesHintOptions x:Key="lineSeriesHintOptions" PointTextPattern="{}{A$yyyy}: {V}M"/>
</ContentPage.Resources>

<dxc:ChartView>
    <dxc:ChartView.Hint>
        <dxc:Hint>
            <dxc:Hint.Behavior>
                <dxc:TooltipHintBehavior ShowPointTooltip="True" ShowSeriesTooltip="False"/>
            </dxc:Hint.Behavior>
        </dxc:Hint>
    </dxc:ChartView.Hint>

    <dxc:ChartView.Series>
        <dxc:LineSeries HintOptions="{StaticResource lineSeriesHintOptions}">
            <!--Series Data-->
        </dxc:LineSeries>
        <dxc:LineSeries HintOptions="{StaticResource lineSeriesHintOptions}">
            <!--Series Data-->
        </dxc:LineSeries>
        <dxc:LineSeries HintOptions="{StaticResource lineSeriesHintOptions}">
            <!--Series Data-->
        </dxc:LineSeries>
    </dxc:ChartView.Series>    
</dxc:ChartView>

Inheritance

Object
Xamarin.Forms.BindableObject
See Also