New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI Chart ToolTip Behavior

The Tooltip behavior of the Chart is responsible for rendering concise information about a data point in a small popup which is displayed close to its relevant data point.


The ToolTip behavior of the Chart supports the TriggerMode property that determines the gestures on which the ChartToolTipBehavior will show a tool tip. The available values are: - Tap - Hold


The following example shows how the ToolTip behavior of the Chart works:

  1. Create the business object:

    public class TemporalData
    public DateTime Date { get; set; }
    public double Value { get; set; }
  2. Create a ViewModel:

    public class ViewModel
    public ObservableCollection<TemporalData> Data { get; set; }
    public ViewModel()
        this.Data = new ObservableCollection<TemporalData>(GetDateTimeData(200));
    private static List<TemporalData> GetDateTimeData(int itemsCount)
        var startDate = new DateTime(2015, 03, 01);
        List<TemporalData> items = new List<TemporalData>();
        for (int i = 0; i < itemsCount; i++)
            TemporalData data = new TemporalData();
            data.Date = startDate.AddDays(i);
            if (i % 2 == 0)
                data.Value = i + 5;
                if (i % 5 == 0)
                    data.Value = i - 15;
        return items;
  3. Declare a RadCartesianChart in XAML:

    <telerik:RadCartesianChart PaletteName="Light"
                                  Zoom="2, 1">
          <telerik:DateTimeContinuousAxis LabelFitMode="Rotate"
                                               LabelFormat="dd MMM"
          <telerik:NumericalAxis />
          <telerik:LineSeries ValueBinding="Value"
                                   ItemsSource="{Binding Data}"/>
          <telerik:ChartTooltipBehavior TriggerMode="Tap" />

    The following image shows how the ToolTip looks:

Chart Tooltip Behavior

See Also

In this article
Not finding the help you need?