menu

UWP

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

    Show / Hide Table of Contents

    Class SfChart

    Represents the Chart control which is used to visualize the data graphically.

    Inheritance
    System.Object
    ChartBase
    SfChart
    Implements
    ICloneable
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Inherited Members
    ChartBase.Axes
    ChartBase.AxisThickness
    ChartBase.AxisThicknessProperty
    ChartBase.Clone()
    ChartBase.ColorModel
    ChartBase.ColorModelProperty
    ChartBase.ColumnDefinitions
    ChartBase.ColumnProperty
    ChartBase.ColumnSpanProperty
    ChartBase.Deserialize(StorageFile)
    ChartBase.Deserialize(Stream)
    ChartBase.GetColumn(UIElement)
    ChartBase.GetColumnSpan(UIElement)
    ChartBase.GetCumulativeStackInfo(ChartSeriesBase, Boolean)
    ChartBase.GetRow(UIElement)
    ChartBase.GetRowSpan(UIElement)
    ChartBase.Header
    ChartBase.HeaderProperty
    ChartBase.HorizontalHeaderAlignment
    ChartBase.HorizontalHeaderAlignmentProperty
    ChartBase.Legend
    ChartBase.LegendProperty
    ChartBase.OnBoxSelectionChanged(ChartSelectionChangedEventArgs)
    ChartBase.OnRootPanelSizeChanged(Size)
    ChartBase.OnSelectionChanged(ChartSelectionChangedEventArgs)
    ChartBase.OnSelectionChanging(ChartSelectionChangingEventArgs)
    ChartBase.Palette
    ChartBase.PaletteProperty
    ChartBase.PointToValue(ChartAxis, Point)
    ChartBase.Print()
    ChartBase.Printing
    ChartBase.PropertyChanged
    ChartBase.ResumeSeriesNotification()
    ChartBase.RowDefinitions
    ChartBase.RowProperty
    ChartBase.RowSpanProperty
    ChartBase.Save()
    ChartBase.Save(IRandomAccessStream, Guid)
    ChartBase.Save(String, StorageFolder)
    ChartBase.SelectedSegments
    ChartBase.SelectionChanged
    ChartBase.SelectionChanging
    ChartBase.Serialize(StorageFile)
    ChartBase.Serialize(Stream)
    ChartBase.SeriesBoundsChanged
    ChartBase.SeriesClipRect
    ChartBase.SeriesSelectedIndex
    ChartBase.SeriesSelectedIndexProperty
    ChartBase.SetColumn(UIElement, Int32)
    ChartBase.SetColumnSpan(UIElement, Int32)
    ChartBase.SetRow(UIElement, Int32)
    ChartBase.SetRowSpan(UIElement, Int32)
    ChartBase.SideBySideSeriesPlacement
    ChartBase.SideBySideSeriesPlacementProperty
    ChartBase.SuspendSeriesNotification()
    ChartBase.VerticalHeaderAlignment
    ChartBase.VerticalHeaderAlignmentProperty
    ChartBase.VisibleSeries
    ChartBase.VisibleSeriesProperty
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.UWP.dll
    Syntax
    public class SfChart : ChartBase, ICloneable, INotifyPropertyChanged, IDisposable
    Remarks

    The Chart is often used to make it easier to understand large amount of data and the relationship between different parts of the data. Chart can usually be read more quickly than the raw data that they come from.

    Certain ChartSeriesBase are more useful for presenting a given data set than others. For example, data that presents percentages in different groups (such as "satisfied, not satisfied, unsure") are often displayed in a PieSeries chart, but are more easily understood when presented in a horizontal BarSeries chart. On the other hand, data that represents numbers that change over a period of time (such as "annual revenue from 2011 to 2012") might be best shown as a LineSeries chart.

    Constructors

    SfChart()

    Called when instance created for SfChart.

    Declaration
    public SfChart()

    Fields

    AnnotationsProperty

    The DependencyProperty for Annotations property.

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

    AreaBackgroundProperty

    The DependencyProperty for AreaBackground property.

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

    AreaBorderBrushProperty

    The DependencyProperty for AreaBorderBrush property.

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

    AreaBorderThicknessProperty

    The DependencyProperty for AreaBorderThickness property.

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

    PrimaryAxisProperty

    The DependencyProperty for PrimaryAxis property.

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

    SecondaryAxisProperty

    The DependencyProperty for SecondaryAxis property.

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

    SeriesProperty

    The DependencyProperty for Series property.

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

    TechnicalIndicatorsProperty

    The DependencyProperty for TechnicalIndicators property.

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

    WatermarkProperty

    The DependencyProperty for Watermark property.

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

    Properties

    Annotations

    Gets or sets a collection of annotations to the chart.

    Declaration
    public AnnotationCollection Annotations { get; set; }
    Property Value
    Type
    AnnotationCollection

    AreaBackground

    Gets or sets the background color of the plotting area.

    Declaration
    public Brush AreaBackground { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Media.Brush

    The Windows.UI.Xaml.Media.Brush value.

    AreaBorderBrush

    Gets or sets the color to paint the outline of chart area.

    Declaration
    public Brush AreaBorderBrush { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Media.Brush

    The Windows.UI.Xaml.Media.Brush value.

    AreaBorderThickness

    Gets or sets the outline thickness of chart area.

    Declaration
    public Thickness AreaBorderThickness { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Thickness

    Behaviors

    Gets or sets the collection of chart behaviors.

    Declaration
    public ChartBehaviorsCollection Behaviors { get; set; }
    Property Value
    Type
    ChartBehaviorsCollection

    PrimaryAxis

    Gets or sets primary axis for SfChart.

    Declaration
    public ChartAxisBase2D PrimaryAxis { get; set; }
    Property Value
    Type
    ChartAxisBase2D

    SecondaryAxis

    Gets or sets the secondary axis for SfChart.

    Declaration
    public RangeAxisBase SecondaryAxis { get; set; }
    Property Value
    Type
    RangeAxisBase

    Series

    Gets or sets a collection of series to be added to the chart. To render a series, create an instance of required series class, and add it to the collection.

    Declaration
    public ChartSeriesCollection Series { get; set; }
    Property Value
    Type
    ChartSeriesCollection

    TechnicalIndicators

    Gets or sets a collection of technical indicators to the chart.

    Declaration
    public ObservableCollection<ChartSeries> TechnicalIndicators { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<ChartSeries>

    Watermark

    Gets or sets the chart watermark.

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

    Methods

    AddZoomToolBar(ZoomingToolBar, ChartZoomPanBehavior)

    Used to add the zooming toolbar in canvas.

    Declaration
    protected void AddZoomToolBar(ZoomingToolBar chartZoomingToolBar, ChartZoomPanBehavior zoomBehavior)
    Parameters
    Type Name Description
    ZoomingToolBar chartZoomingToolBar

    ZoomingToolBar value.

    ChartZoomPanBehavior zoomBehavior

    ChartZoomPanBehavior instance.

    Dispose()

    Performs application-defined tasks accociated with freeing, releasing, or resetting unmanaged resource in SfChart.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Disposing chart objects.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Used to indicate perform dispose or not.

    MeasureOverride(Size)

    Provides the behavior for the Measure pass of Silverlight layout. Classes can override this method to define their own Measure pass behavior.

    Declaration
    protected override Size MeasureOverride(Size availableSize)
    Parameters
    Type Name Description
    Windows.Foundation.Size availableSize

    The size value.

    Returns
    Type Description
    Windows.Foundation.Size

    The size that this object determines it needs during layout, based on its calculations of the allocated sizes for child objects; or based on other considerations, such as a fixed container size.

    OnApplyTemplate()

    Invoke to render SfChart.

    Declaration
    protected override void OnApplyTemplate()

    OnDoubleTapped(DoubleTappedRoutedEventArgs)

    Called when double tapped in the chart.

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

    DoubleTappedRoutedEventArgs.

    OnDragEnter(DragEventArgs)

    Called when drag enter into the chart.

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

    DragEventArgs.

    OnDragLeave(DragEventArgs)

    Called when drag leave from the chart.

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

    DragEventArgs.

    OnDragOver(DragEventArgs)

    Called when drag over the chart.

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

    DragEventArgs.

    OnDrop(DragEventArgs)

    Called when drop the pointer in the chart.

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

    DragEventArgs.

    OnGotFocus(RoutedEventArgs)

    Called when got focus in the SfChart.

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

    RoutedEventArgs.

    OnHolding(HoldingRoutedEventArgs)

    Called when holding the pointer in the chart.

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

    HoldingRoutedEventArgs.

    OnKeyDown(KeyRoutedEventArgs)

    Called when key down in the chart.

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

    KeyRoutedEventArgs.

    OnKeyUp(KeyRoutedEventArgs)

    called when pointer key up in the chart.

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

    KeyRoutedEventArgs.

    OnLostFocus(RoutedEventArgs)

    called when lost focus from the SfChart.

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

    RoutedEventArgs.

    OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)

    Called when manipulation completed in the chart.

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

    ManipulationCompletedRoutedEventArgs.

    OnManipulationDelta(ManipulationDeltaRoutedEventArgs)

    Called when manipulation delta changed.

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

    ManipulationDeltaRoutedEventArgs.

    OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)

    called when manipulation inertia starting in the chart.

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

    ManipulationInertiaStartingRoutedEventArgs.

    OnManipulationStarted(ManipulationStartedRoutedEventArgs)

    called when manipulation started in the sfchart.

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

    ManipulationStartedRoutedEventArgs.

    OnManipulationStarting(ManipulationStartingRoutedEventArgs)

    called when manipulation starting in the chart.

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

    ManipulationStartingRoutedEventArgs.

    OnPanChanged(PanChangedEventArgs)

    Occurs when panning position changed in chart.

    Declaration
    protected virtual void OnPanChanged(PanChangedEventArgs args)
    Parameters
    Type Name Description
    PanChangedEventArgs args

    PanChangedEventArgs

    OnPanChanging(PanChangingEventArgs)

    Occurs when panning takes place in chart.

    Declaration
    protected virtual void OnPanChanging(PanChangingEventArgs args)
    Parameters
    Type Name Description
    PanChangingEventArgs args

    PanChangingEventArgs

    OnPointerCanceled(PointerRoutedEventArgs)

    Called when pointer cancelled in the chart.

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

    PointerRoutedEventArgs.

    OnPointerCaptureLost(PointerRoutedEventArgs)

    Called when point capture lost in the chart.

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

    PointerRoutedEventArgs.

    OnPointerEntered(PointerRoutedEventArgs)

    Called when pointer entered in the chart.

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

    PointerRoutedEventArgs.

    OnPointerExited(PointerRoutedEventArgs)

    Called when pointer exited from the chart.

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

    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.

    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.

    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.

    OnPointerWheelChanged(PointerRoutedEventArgs)

    Called when pointer wheel changed in the chart.

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

    PointerRoutedEventArgs.

    OnResetZoom(ResetZoomEventArgs)

    Occurs when zoom is reset.

    Declaration
    protected virtual void OnResetZoom(ResetZoomEventArgs args)
    Parameters
    Type Name Description
    ResetZoomEventArgs args

    ResetZoomEventArgs.

    OnRightTapped(RightTappedRoutedEventArgs)

    Called when right click in the chart.

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

    RightTappedRoutedEventArgs.

    OnSelectionZoomingDelta(SelectionZoomingDeltaEventArgs)

    Occurs while selection zooming in chart.

    Declaration
    protected virtual void OnSelectionZoomingDelta(SelectionZoomingDeltaEventArgs args)
    Parameters
    Type Name Description
    SelectionZoomingDeltaEventArgs args

    SelectionZoomingDeltaEventArgs

    OnSelectionZoomingEnd(SelectionZoomingEndEventArgs)

    Occurs at the end of selection zooming.

    Declaration
    protected virtual void OnSelectionZoomingEnd(SelectionZoomingEndEventArgs args)
    Parameters
    Type Name Description
    SelectionZoomingEndEventArgs args

    SelectionZoomingEndEventArgs

    OnSelectionZoomingStart(SelectionZoomingStartEventArgs)

    Occurs at the start of selection zooming.

    Declaration
    protected virtual void OnSelectionZoomingStart(SelectionZoomingStartEventArgs args)
    Parameters
    Type Name Description
    SelectionZoomingStartEventArgs args

    SelectionZoomingStartEventArgs

    OnSeriesBoundsChanged(ChartSeriesBoundsEventArgs)

    Raises the SeriesBoundsChanged event.

    Declaration
    protected override void OnSeriesBoundsChanged(ChartSeriesBoundsEventArgs args)
    Parameters
    Type Name Description
    ChartSeriesBoundsEventArgs args

    The ChartSeriesBoundsEventArgs instance containing the event data.

    Overrides
    ChartBase.OnSeriesBoundsChanged(ChartSeriesBoundsEventArgs)

    OnTapped(TappedRoutedEventArgs)

    Called when tapped in the chart.

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

    TappedRoutedEventArgs.

    OnZoomChanged(ZoomChangedEventArgs)

    Occurs when zooming position changed in chart.

    Declaration
    protected virtual void OnZoomChanged(ZoomChangedEventArgs args)
    Parameters
    Type Name Description
    ZoomChangedEventArgs args

    ZoomChangedEventArgs

    OnZoomChanging(ZoomChangingEventArgs)

    Occurs when zooming takes place in chart.

    Declaration
    protected virtual void OnZoomChanging(ZoomChangingEventArgs args)
    Parameters
    Type Name Description
    ZoomChangingEventArgs args

    ZoomChangingEventArgs

    RemoveZoomToolBar(ZoomingToolBar)

    Declaration
    protected void RemoveZoomToolBar(ZoomingToolBar chartZoomingToolBar)
    Parameters
    Type Name Description
    ZoomingToolBar chartZoomingToolBar

    SeriesSelectedIndexChanged(Int32, Int32)

    Method used to highlight selected index series.

    Declaration
    public override void SeriesSelectedIndexChanged(int newIndex, int oldIndex)
    Parameters
    Type Name Description
    System.Int32 newIndex

    Used to indicate current selected index.

    System.Int32 oldIndex

    Used to indicate previous selected index.

    Overrides
    ChartBase.SeriesSelectedIndexChanged(Int32, Int32)

    ValueToPoint(ChartAxis, Double)

    Converts Value to point.

    Declaration
    public override double ValueToPoint(ChartAxis axis, double value)
    Parameters
    Type Name Description
    ChartAxis axis

    The Chart axis .

    System.Double value

    The value.

    Returns
    Type Description
    System.Double

    The double value to point.

    Overrides
    ChartBase.ValueToPoint(ChartAxis, Double)

    ValueToPointRelativeToAnnotation(ChartAxis, Double)

    Converts Value to point.

    Declaration
    public double ValueToPointRelativeToAnnotation(ChartAxis axis, double value)
    Parameters
    Type Name Description
    ChartAxis axis

    The Chart axis .

    System.Double value

    The value.

    Returns
    Type Description
    System.Double

    The double value to point.

    Events

    PanChanged

    Occurs when panning position of chart is changed.

    Declaration
    public event EventHandler<PanChangedEventArgs> PanChanged
    Event Type
    Type
    System.EventHandler<PanChangedEventArgs>

    PanChanging

    Occurs when panning takes place in chart.

    Declaration
    public event EventHandler<PanChangingEventArgs> PanChanging
    Event Type
    Type
    System.EventHandler<PanChangingEventArgs>

    ResetZooming

    Occurs when the zoom is reset.

    Declaration
    public event EventHandler<ResetZoomEventArgs> ResetZooming
    Event Type
    Type
    System.EventHandler<ResetZoomEventArgs>

    SelectionZoomingDelta

    Occurs during selection zooming.

    Declaration
    public event EventHandler<SelectionZoomingDeltaEventArgs> SelectionZoomingDelta
    Event Type
    Type
    System.EventHandler<SelectionZoomingDeltaEventArgs>

    SelectionZoomingEnd

    Occurs at the end of selection zooming.

    Declaration
    public event EventHandler<SelectionZoomingEndEventArgs> SelectionZoomingEnd
    Event Type
    Type
    System.EventHandler<SelectionZoomingEndEventArgs>

    SelectionZoomingStart

    Occurs at the start of selection zooming.

    Declaration
    public event EventHandler<SelectionZoomingStartEventArgs> SelectionZoomingStart
    Event Type
    Type
    System.EventHandler<SelectionZoomingStartEventArgs>

    ZoomChanged

    Occurs when chart zooming value is changed.

    Declaration
    public event EventHandler<ZoomChangedEventArgs> ZoomChanged
    Event Type
    Type
    System.EventHandler<ZoomChangedEventArgs>

    ZoomChanging

    Occurs when zooming takes place in chart.

    Declaration
    public event EventHandler<ZoomChangingEventArgs> ZoomChanging
    Event Type
    Type
    System.EventHandler<ZoomChangingEventArgs>

    Implements

    ICloneable
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

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