menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class ChartSelectionBehavior

    ChartSelectionBehavior enables the selection of individual segment in a series or chart series itself.

    Inheritance
    System.Object
    ChartBehavior
    ChartSelectionBehavior
    Inherited Members
    ChartBehavior.Chart
    ChartBehavior.DoubleTap(Single, Single)
    ChartBehavior.OnTouchDown(Single, Single)
    ChartBehavior.OnTouchMove(Single, Single)
    ChartBehavior.OnTouchUp(Single, Single)
    Namespace: Syncfusion.SfChart.XForms
    Assembly: Syncfusion.SfChart.XForms.dll
    Syntax
    public class ChartSelectionBehavior : ChartBehavior, IThemeElement
    Remarks

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

    Examples
    SfChart chart = new SfChart();
    ChartSelectionBehavior selection = new ChartSelectionBehavior();
    chart.ChartBehaviors.Add(selection);

    Constructors

    ChartSelectionBehavior()

    Declaration
    public ChartSelectionBehavior()

    Methods

    OnSelectionChanged(ChartSelectionEventArgs)

    Raised after the current selection changes in ChartSegment.

    Declaration
    protected virtual void OnSelectionChanged(ChartSelectionEventArgs arg)
    Parameters
    Type Name Description
    ChartSelectionEventArgs arg

    event args value.

    OnSelectionChanging(ChartSelectionChangingEventArgs)

    Raised just before the current selection changes in ChartSegment.

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

    event args value.

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