UWP

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartBehavior - UWP API Reference | Syncfusion SfChart ">

    Show / Hide Table of Contents

    Class ChartBehavior

    ChartBehavior is an abstract base class for behaviors which can be added to SfChart

    Inheritance
    System.Object
    ChartBehavior
    ChartCrossHairBehavior
    ChartSelectionBehavior
    ChartTrackBallBehavior
    ChartZoomPanBehavior
    Implements
    ICloneable
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.UWP.dll
    Syntax
    public abstract class ChartBehavior : DependencyObject, ICloneable
    Remarks

    You can handle the SfChart events directly in Chart behavior,which will be helpful in designing the Chart application in MVVM pattern. You can add a custom behavior to the SfChart by inheriting a class from the ChartBehavior. You can also add ui elements to the Chart by making use of the top layer canvas returned from AdorningCanvas property,which can be used to place the ui elements at desired positions in SfChart.

    Examples

    This example, we are using ChartZoomPanBehavior.

        <syncfusion:SfChart>
            <syncfusion:SfChart.Behaviors>
                <syncfusion:ChartZoomPanBehaviorgt;
            </syncfusion:SfChart.Behaviors>
        <syncfusion:SfChart>
        ChartZoomPanBehavior zoomPanBehavior = new ChartZoomPanBehavior();
        chartArea.Behaviors.Add(zoomPanBehavior);

    Constructors

    ChartBehavior()

    Called when instance created for ChartBehavior

    Declaration
    public ChartBehavior()

    Fields

    chartAxis

    Declaration
    protected ChartAxis chartAxis
    Field Value
    Type Description
    ChartAxis

    Properties

    AdorningCanvas

    Gets the top layer Canvas.

    Declaration
    public Canvas AdorningCanvas { get; }
    Property Value
    Type Description
    Windows.UI.Xaml.Controls.Canvas

    BottomAdorningCanvas

    Gets the bottom layer Canvas.

    Declaration
    public Canvas BottomAdorningCanvas { get; }
    Property Value
    Type Description
    Windows.UI.Xaml.Controls.Canvas

    ChartArea

    Gets the owner Chart

    Declaration
    public SfChart ChartArea { get; }
    Property Value
    Type Description
    SfChart

    Methods

    AlignDefaultLabel(ChartAlignment, ChartAlignment, Double, Double, ContentControl)

    Declaration
    protected virtual void AlignDefaultLabel(ChartAlignment verticalAlignemnt, ChartAlignment horizontalAlignment, double x, double y, ContentControl control)
    Parameters
    Type Name Description
    ChartAlignment verticalAlignemnt
    ChartAlignment horizontalAlignment
    System.Double x
    System.Double y
    Windows.UI.Xaml.Controls.ContentControl control

    AttachElements()

    Method implementation for AttachElements

    Declaration
    protected virtual void AttachElements()

    Clone()

    Returns the clone behavior

    Declaration
    public DependencyObject Clone()
    Returns
    Type Description
    Windows.UI.Xaml.DependencyObject

    CloneBehavior(DependencyObject)

    Declaration
    protected virtual DependencyObject CloneBehavior(DependencyObject obj)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyObject obj
    Returns
    Type Description
    Windows.UI.Xaml.DependencyObject

    DetachElement(UIElement)

    Method implementation for DetachElement

    Declaration
    protected virtual void DetachElement(UIElement element)
    Parameters
    Type Name Description
    Windows.UI.Xaml.UIElement element

    DetachElements()

    Method implementation for DetachElements

    Declaration
    protected virtual void DetachElements()

    GetYValuesBasedOnIndex(Double, ChartSeriesBase)

    Return collection of double values from the given ChartSeries

    Declaration
    protected IList<double> GetYValuesBasedOnIndex(double x, ChartSeriesBase series)
    Parameters
    Type Name Description
    System.Double x
    ChartSeriesBase series
    Returns
    Type Description
    System.Collections.Generic.IList<System.Double>

    OnDoubleTapped(DoubleTappedRoutedEventArgs)

    Method implementation for OnDoubleTapped

    Declaration
    protected virtual void OnDoubleTapped(DoubleTappedRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e

    OnDragEnter(DragEventArgs)

    Called when Drag action enter into the ChartArea

    Declaration
    protected virtual void OnDragEnter(DragEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DragEventArgs e

    OnDragLeave(DragEventArgs)

    Called when Drag action leave from the area

    Declaration
    protected virtual void OnDragLeave(DragEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DragEventArgs e

    OnDragOver(DragEventArgs)

    Called when Drag action over in the Area

    Declaration
    protected virtual void OnDragOver(DragEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DragEventArgs e

    OnDrop(DragEventArgs)

    Called when drop the cursor in ChartArea

    Declaration
    protected virtual void OnDrop(DragEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DragEventArgs e

    OnGotFocus(RoutedEventArgs)

    Called when GotFocus in UIElement

    Declaration
    protected virtual void OnGotFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    OnHolding(HoldingRoutedEventArgs)

    Called when Holding the Focus in UIElement

    Declaration
    protected virtual void OnHolding(HoldingRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.HoldingRoutedEventArgs e

    OnKeyDown(KeyRoutedEventArgs)

    Called when KeyDown in Chart

    Declaration
    protected virtual void OnKeyDown(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.KeyRoutedEventArgs e

    OnKeyUp(KeyRoutedEventArgs)

    Called when Key up in Chart

    Declaration
    protected virtual void OnKeyUp(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.KeyRoutedEventArgs e

    OnLayoutUpdated()

    Called when layout updated

    Declaration
    protected virtual void OnLayoutUpdated()

    OnLostFocus(RoutedEventArgs)

    Called when Lost the focus in Chart

    Declaration
    protected virtual void OnLostFocus(RoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.RoutedEventArgs e

    OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)

    Called when Manipulation complete in Chart

    Declaration
    protected virtual void OnManipulationCompleted(ManipulationCompletedRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs e

    OnManipulationDelta(ManipulationDeltaRoutedEventArgs)

    Called when Manipulation delta is changed in Chart

    Declaration
    protected virtual void OnManipulationDelta(ManipulationDeltaRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e

    OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)

    Called when Manipulation action Start in Chart

    Declaration
    protected virtual void OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e

    OnManipulationStarted(ManipulationStartedRoutedEventArgs)

    Called when Manipulation Started

    Declaration
    protected virtual void OnManipulationStarted(ManipulationStartedRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.ManipulationStartedRoutedEventArgs e

    OnManipulationStarting(ManipulationStartingRoutedEventArgs)

    Called when manipulation starting

    Declaration
    protected virtual void OnManipulationStarting(ManipulationStartingRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.ManipulationStartingRoutedEventArgs e

    OnPointerCanceled(PointerRoutedEventArgs)

    Called when Pointer cancelled in Chart

    Declaration
    protected virtual void OnPointerCanceled(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerCaptureLost(PointerRoutedEventArgs)

    Called when Pointer Capturedlost in Chart.

    Declaration
    protected virtual void OnPointerCaptureLost(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerEntered(PointerRoutedEventArgs)

    Called when PointerEntered in Chart

    Declaration
    protected virtual void OnPointerEntered(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerExited(PointerRoutedEventArgs)

    Called when PointerExited in Chart

    Declaration
    protected virtual void OnPointerExited(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerMoved(PointerRoutedEventArgs)

    Called when Pointer moved in Chart

    Declaration
    protected virtual void OnPointerMoved(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerPressed(PointerRoutedEventArgs)

    Called when Pointer pressed in Chart

    Declaration
    protected virtual void OnPointerPressed(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerReleased(PointerRoutedEventArgs)

    Called when Pointer Released in Chart

    Declaration
    protected virtual void OnPointerReleased(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnPointerWheelChanged(PointerRoutedEventArgs)

    Called when PointerWheel Changed

    Declaration
    protected virtual void OnPointerWheelChanged(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnRightTapped(RightTappedRoutedEventArgs)

    Called when RightTapped the Chart

    Declaration
    protected virtual void OnRightTapped(RightTappedRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e

    OnSizeChanged(SizeChangedEventArgs)

    Called when Size Changed

    Declaration
    protected virtual void OnSizeChanged(SizeChangedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.SizeChangedEventArgs e

    OnTapped(TappedRoutedEventArgs)

    Called when Tapped the Chart

    Declaration
    protected virtual void OnTapped(TappedRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.TappedRoutedEventArgs e

    UpdateArea()

    Method implementation for UpdateArea in Chart

    Declaration
    protected void UpdateArea()

    Implements

    ICloneable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

    ChartZoomPanBehavior
    ChartSelectionBehavior
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved