menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartSelectionBehavior - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartSelectionBehavior

    ChartSelectionBehavior enables the selection of segments in a Chart.

    Inheritance
    System.Object
    ChartBehavior
    ChartSelectionBehavior
    Implements
    ICloneable
    Inherited Members
    ChartBehavior.AdorningCanvas
    ChartBehavior.AlignDefaultLabel(ChartAlignment, ChartAlignment, Double, Double, ContentControl)
    ChartBehavior.AttachElements()
    ChartBehavior.BottomAdorningCanvas
    ChartBehavior.ChartArea
    ChartBehavior.chartAxis
    ChartBehavior.Clone()
    ChartBehavior.DetachElement(UIElement)
    ChartBehavior.DetachElements()
    ChartBehavior.GetYValuesBasedOnIndex(Double, ChartSeriesBase)
    ChartBehavior.OnDoubleTapped(DoubleTappedRoutedEventArgs)
    ChartBehavior.OnDragEnter(DragEventArgs)
    ChartBehavior.OnDragLeave(DragEventArgs)
    ChartBehavior.OnDragOver(DragEventArgs)
    ChartBehavior.OnDrop(DragEventArgs)
    ChartBehavior.OnGotFocus(RoutedEventArgs)
    ChartBehavior.OnHolding(HoldingRoutedEventArgs)
    ChartBehavior.OnKeyDown(KeyRoutedEventArgs)
    ChartBehavior.OnKeyUp(KeyRoutedEventArgs)
    ChartBehavior.OnLayoutUpdated()
    ChartBehavior.OnLostFocus(RoutedEventArgs)
    ChartBehavior.OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)
    ChartBehavior.OnManipulationDelta(ManipulationDeltaRoutedEventArgs)
    ChartBehavior.OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)
    ChartBehavior.OnManipulationStarted(ManipulationStartedRoutedEventArgs)
    ChartBehavior.OnManipulationStarting(ManipulationStartingRoutedEventArgs)
    ChartBehavior.OnPointerCanceled(PointerRoutedEventArgs)
    ChartBehavior.OnPointerCaptureLost(PointerRoutedEventArgs)
    ChartBehavior.OnPointerEntered(PointerRoutedEventArgs)
    ChartBehavior.OnPointerWheelChanged(PointerRoutedEventArgs)
    ChartBehavior.OnRightTapped(RightTappedRoutedEventArgs)
    ChartBehavior.OnSizeChanged(SizeChangedEventArgs)
    ChartBehavior.OnTapped(TappedRoutedEventArgs)
    ChartBehavior.UpdateArea()
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.UWP.dll
    Syntax
    public class ChartSelectionBehavior : ChartBehavior, ICloneable
    Remarks

    The selected segment can be displayed with a different color specified using SegmentSelectionBrush property available in corresponding series. ChartSelectionBehavior is applicable only to certain series such as ColumnSeries,BarSeries, RangeColumnSeries,StackingBarSeries,StackingColumnSeries,ScatterSeries, BubbleSeries,PieSeries.

    Examples

    This example, we are using ChartSelectionBehavior.

        <syncfusion:SfChart>
            <syncfusion:SfChart.Behaviors>
                <syncfusion:ChartSelectionBehavior/>
            </syncfusion:SfChart.Behaviors>
        </syncfusion:SfChart>
        ChartSelectionBehavior selectionBehavior = new ChartSelectionBehavior();
        chartArea.Behaviors.Add(selectionBehavior);

    Constructors

    ChartSelectionBehavior()

    Declaration
    public ChartSelectionBehavior()

    Fields

    EnableSegmentSelectionProperty

    The DependencyProperty for EnableSegmentSelection property.

    Declaration
    public static readonly DependencyProperty EnableSegmentSelectionProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    EnableSeriesSelectionProperty

    The DependencyProperty for EnableSeriesSelection property.

    Declaration
    public static readonly DependencyProperty EnableSeriesSelectionProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectionCursorProperty

    The DependencyProperty for SelectionCursor property.

    Declaration
    public static readonly DependencyProperty SelectionCursorProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectionModeProperty

    The DependencyProperty for SelectionMode property.

    Declaration
    public static readonly DependencyProperty SelectionModeProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectionStyleProperty

    The DependencyProperty for SelectionStyle property.

    Declaration
    public static readonly DependencyProperty SelectionStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    Properties

    EnableSegmentSelection

    Gets or sets a value indicating whether the segment (or) datapoint selection is enabled or not.

    Declaration
    public bool EnableSegmentSelection { get; set; }
    Property Value
    Type
    System.Boolean

    EnableSeriesSelection

    Gets or sets a value indicating whether the series selection is enabled or not.

    Declaration
    public bool EnableSeriesSelection { get; set; }
    Property Value
    Type
    System.Boolean

    SelectionCursor

    Gets or sets the pointer cursor for the series, which indicates that the series selection cursor type.

    Declaration
    public CoreCursorType SelectionCursor { get; set; }
    Property Value
    Type Description
    Windows.UI.Core.CoreCursorType

    Windows.UI.Core.CoreCursorType

    Remarks

    Default value is Arrow.

    SelectionMode

    Gets or sets the selection mode value, which indicates that this series is how to selectable.

    Declaration
    public SelectionMode SelectionMode { get; set; }
    Property Value
    Type
    SelectionMode

    SelectionStyle

    Gets or sets the SelectionStyle value that indicated the selection type in SfChart.

    Declaration
    public SelectionStyle SelectionStyle { get; set; }
    Property Value
    Type Description
    SelectionStyle

    SelectionStyle

    Methods

    CloneBehavior(DependencyObject)

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

    GetSeriesSelectionBrush(ChartSeriesBase)

    Method used to get selection brush for series selection.

    Declaration
    public virtual Brush GetSeriesSelectionBrush(ChartSeriesBase series)
    Parameters
    Type Name Description
    ChartSeriesBase series

    ChartSeriesBase

    Returns
    Type Description
    Windows.UI.Xaml.Media.Brush

    Returns brush for selected segment.

    OnPointerExited(PointerRoutedEventArgs)

    Called when pointer exited in the chart.

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

    PointerRoutedEventArgs

    Overrides
    ChartBehavior.OnPointerExited(PointerRoutedEventArgs)

    OnPointerMoved(PointerRoutedEventArgs)

    Called when pointer moved in the chart.

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

    PointerRoutedEventArgs

    Overrides
    ChartBehavior.OnPointerMoved(PointerRoutedEventArgs)

    OnPointerPressed(PointerRoutedEventArgs)

    Called when pointer pressed in the chart.

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

    PointerRoutedEventArgs

    Overrides
    ChartBehavior.OnPointerPressed(PointerRoutedEventArgs)

    OnPointerReleased(PointerRoutedEventArgs)

    Called when pointer released in the chart.

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

    PointerRoutedEventArgs

    Overrides
    ChartBehavior.OnPointerReleased(PointerRoutedEventArgs)

    OnSelectionChanged(ChartSelectionChangedEventArgs)

    Invoked whenever the SelectionChanged event have raised.

    Declaration
    protected virtual void OnSelectionChanged(ChartSelectionChangedEventArgs eventArgs)
    Parameters
    Type Name Description
    ChartSelectionChangedEventArgs eventArgs

    type of ChartSelectionChangedEventArgs

    OnSelectionChanging(ChartSelectionChangingEventArgs)

    Invoked whenever the SelectionChanging event have raised.

    Declaration
    protected virtual void OnSelectionChanging(ChartSelectionChangingEventArgs eventArgs)
    Parameters
    Type Name Description
    ChartSelectionChangingEventArgs eventArgs

    type of ChartSelectionChangingEventArgs

    Implements

    ICloneable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved