WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartSelectionBehavior

    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.chartAxis
    ChartBehavior.Clone()
    ChartBehavior.OnLayoutUpdated()
    ChartBehavior.DetachElement(UIElement)
    ChartBehavior.DetachElements()
    ChartBehavior.OnSizeChanged(SizeChangedEventArgs)
    ChartBehavior.OnDragEnter(DragEventArgs)
    ChartBehavior.OnDragLeave(DragEventArgs)
    ChartBehavior.OnDragOver(DragEventArgs)
    ChartBehavior.OnDrop(DragEventArgs)
    ChartBehavior.OnGotFocus(RoutedEventArgs)
    ChartBehavior.OnLostFocus(RoutedEventArgs)
    ChartBehavior.OnMouseWheel(MouseWheelEventArgs)
    ChartBehavior.OnMouseEnter(MouseEventArgs)
    ChartBehavior.OnKeyUp(KeyEventArgs)
    ChartBehavior.OnKeyDown(KeyEventArgs)
    ChartBehavior.OnManipulationStarted(ManipulationStartedEventArgs)
    ChartBehavior.OnManipulationCompleted(ManipulationCompletedEventArgs)
    ChartBehavior.OnManipulationDelta(ManipulationDeltaEventArgs)
    ChartBehavior.OnDoubleTapped(MouseButtonEventArgs)
    ChartBehavior.AlignDefaultLabel(ChartAlignment, ChartAlignment, Double, Double, ContentControl)
    ChartBehavior.AttachElements()
    ChartBehavior.GetYValuesBasedOnIndex(Double, ChartSeriesBase)
    ChartBehavior.UpdateArea()
    ChartBehavior.AdorningCanvas
    ChartBehavior.BottomAdorningCanvas
    ChartBehavior.ChartArea
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.WPF.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 Description
    System.Windows.DependencyProperty

    EnableSeriesSelectionProperty

    The DependencyProperty for EnableSeriesSelection property.

    Declaration
    public static readonly DependencyProperty EnableSeriesSelectionProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    SelectionCursorProperty

    The DependencyProperty for SelectionCursor property.

    Declaration
    public static readonly DependencyProperty SelectionCursorProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    SelectionModeProperty

    The DependencyProperty for SelectionMode property.

    Declaration
    public static readonly DependencyProperty SelectionModeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    SelectionStyleProperty

    The DependencyProperty for SelectionStyle property.

    Declaration
    public static readonly DependencyProperty SelectionStyleProperty
    Field Value
    Type Description
    System.Windows.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 Description
    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 Description
    System.Boolean

    SelectionCursor

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

    Declaration
    public Cursor SelectionCursor { get; set; }
    Property Value
    Type Description
    System.Windows.Input.Cursor
    Remarks

    Default value is null

    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 Description
    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
    System.Windows.DependencyObject obj
    Returns
    Type Description
    System.Windows.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
    System.Windows.Media.Brush

    Returns brush for selected segment.

    OnMouseLeave(MouseEventArgs)

    Called when mouse leaved in the chart.

    Declaration
    protected override void OnMouseLeave(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    MouseEventArgs

    Overrides
    ChartBehavior.OnMouseLeave(MouseEventArgs)

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Called when mouse left button is clicked.

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    MouseButtonEventArgs

    Overrides
    ChartBehavior.OnMouseLeftButtonDown(MouseButtonEventArgs)

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Called when mouse left button was released.

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    MouseButtonEventArgs

    Overrides
    ChartBehavior.OnMouseLeftButtonUp(MouseButtonEventArgs)

    OnMouseMove(MouseEventArgs)

    Called when mouse moved in the chart.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    MouseEventArgs

    Overrides
    ChartBehavior.OnMouseMove(MouseEventArgs)

    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
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved