menu

MAUI Toolkit

  • User Guide
  • Demos
  • Support
Class ChartInteractiveBehavior - MAUI-ToolKit API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartInteractiveBehavior

    Represents a class that handles touch interactions within the chart area. The ChartInteractiveBehavior class provides methods that respond to various touch events, allowing users to customize behavior for actions such as OnTouchDown, OnTouchMove, and OnTouchUp.

    Inheritance
    System.Object
    ChartBehavior
    ChartInteractiveBehavior
    Inherited Members
    ChartBehavior.OnTouchDown(ChartBase, Single, Single)
    ChartBehavior.OnTouchMove(ChartBase, Single, Single)
    ChartBehavior.OnTouchUp(ChartBase, Single, Single)
    Namespace: Syncfusion.Maui.Toolkit.Charts
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public class ChartInteractiveBehavior : ChartBehavior
    Remarks

    OnTouchDown() - gets called when the user makes the initial contact of a user's finger or touch input device with the Chart Area.

    OnTouchMove() - gets called when a user's finger or touch input device is in contact with the Chart area and moves across its surface.

    OnTouchUp() - gets called when a user lifts their finger or releases their touch input from the Chart area.

    To utilize these methods, derive a new class from ChartInteractiveBehavior.

    Then, create the instance for that class, and it must be added in the chart's InteractiveBehavior as per the following code sample.

    Examples
    • ChartInteractionExt.cs
    • MainPage.xaml
    • MainPage.xaml.cs
    public class ChartInteractionExt : ChartInteractiveBehavior
    {
       <!--omitted for brevity-->
    }
    <chart:SfCartesianChart>
    
        <!--omitted for brevity-->
    
        <chart:SfCartesianChart.InteractiveBehavior>
             <local:ChartInteractionExt/>
        </chart:SfCartesianChart.InteractiveBehavior>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ChartInteractionExt interaction = new ChartInteractionExt();
    chart.ChartInteractiveBehavior = interaction;

    Constructors

    ChartInteractiveBehavior()

    Declaration
    public ChartInteractiveBehavior()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved