Class ChartBase
ChartBase is a base class for chart. Which represents a chart control with basic presentation characteristics.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public abstract class ChartBase : Control, IDisposable
Constructors
ChartBase()
Called when instance created for ChartBase.
Declaration
public ChartBase()
Fields
ColorModelProperty
The DependencyProperty for ColorModel property.
Declaration
public static readonly DependencyProperty ColorModelProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
HeaderProperty
The DependencyProperty for Header property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
HorizontalHeaderAlignmentProperty
The DependencyProperty for HorizontalHeaderAlignment property.
Declaration
public static readonly DependencyProperty HorizontalHeaderAlignmentProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
LegendProperty
The DependencyProperty for Legend property.
Declaration
public static readonly DependencyProperty LegendProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
PaletteProperty
The DependencyProperty for Palette property.
Declaration
public static readonly DependencyProperty PaletteProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
VerticalHeaderAlignmentProperty
The DependencyProperty for VerticalHeaderAlignment property.
Declaration
public static readonly DependencyProperty VerticalHeaderAlignmentProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
VisibleSeriesProperty
The DependencyProperty for VisibleSeries property.
Declaration
public static readonly DependencyProperty VisibleSeriesProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
Behaviors
Gets or sets the collection of chart behaviors.
Declaration
public ChartBehaviorsCollection Behaviors { get; set; }
Property Value
Type | Description |
---|---|
ChartBehaviorsCollection |
ColorModel
Gets or sets the color schemes for all series in the chart.
Declaration
public ChartColorModel ColorModel { get; set; }
Property Value
Type | Description |
---|---|
ChartColorModel |
Header
Gets or sets title for the chart.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
HorizontalHeaderAlignment
Gets or sets the horizontal alignment for the header.
Declaration
public HorizontalAlignment HorizontalHeaderAlignment { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.HorizontalAlignment | Microsoft.UI.Xaml.HorizontalAlignment |
Legend
Gets or sets a legend that helps to identify the series in the chart.
Declaration
public object Legend { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The legend. |
Palette
Gets or sets palette for chart. By default, it is Metro.
Declaration
public ChartColorPalette Palette { get; set; }
Property Value
Type | Description |
---|---|
ChartColorPalette |
SelectedSeriesIndex
Gets or sets the index to select the series.
Declaration
public int SelectedSeriesIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SeriesClipRect
Gets a bounds of chart area excluding axis and chart header.
Declaration
public Rect SeriesClipRect { get; }
Property Value
Type | Description |
---|---|
Windows.Foundation.Rect |
VerticalHeaderAlignment
Gets or sets the vertical alignment for the header.
Declaration
public VerticalAlignment VerticalHeaderAlignment { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.VerticalAlignment | Microsoft.UI.Xaml.VerticalAlignment |
VisibleSeries
Gets the collection of visible series in the chart.
Declaration
public ChartVisibleSeriesCollection VisibleSeries { get; }
Property Value
Type | Description |
---|---|
ChartVisibleSeriesCollection |
Remarks
This property is intended to be used for custom
Methods
Dispose()
Performs application-defined tasks accociated with freeing, releasing, or resetting unmanaged resource in ChartBase.
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 ChartBase.
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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.UI.Xaml.DragEventArgs | e | DragEventArgs. |
OnDragOver(DragEventArgs)
Called when drag over the chart.
Declaration
protected override void OnDragOver(DragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.UI.Xaml.DragEventArgs | e | DragEventArgs. |
OnGotFocus(RoutedEventArgs)
Called when got focus in the ChartBase.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.UI.Xaml.Input.KeyRoutedEventArgs | e | KeyRoutedEventArgs. |
OnLostFocus(RoutedEventArgs)
called when lost focus from the ChartBase.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs | e | ManipulationCompletedRoutedEventArgs. |
OnManipulationDelta(ManipulationDeltaRoutedEventArgs)
Called when manipulation delta changed.
Declaration
protected override void OnManipulationDelta(ManipulationDeltaRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.UI.Xaml.Input.ManipulationStartingRoutedEventArgs | e | ManipulationStartingRoutedEventArgs. |
OnPointerCanceled(PointerRoutedEventArgs)
Called when pointer cancelled in the chart.
Declaration
protected override void OnPointerCanceled(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.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 |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | PointerRoutedEventArgs. |
OnRightTapped(RightTappedRoutedEventArgs)
Called when right click in the chart.
Declaration
protected override void OnRightTapped(RightTappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.RightTappedRoutedEventArgs | e | RightTappedRoutedEventArgs. |
OnTapped(TappedRoutedEventArgs)
Called when tapped in the chart.
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e | TappedRoutedEventArgs. |
ResumeSeriesNotification()
Processes the data that is added to the data source after the SuspendSeriesNotification is called.
Declaration
public void ResumeSeriesNotification()
SuspendSeriesNotification()
Suspends all the series from updating the data till ResumeSeriesNotification is called. It is specifically used when you need to append the collection of data.
Declaration
public void SuspendSeriesNotification()
Events
SelectionChanged
Event correspond to series and segment selection. It invokes once selection changed from a series or segment.
Declaration
public event EventHandler<ChartSelectionChangedEventArgs> SelectionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ChartSelectionChangedEventArgs> |
Remarks
SelectionChanging
Event correspond to series and segment selection. It invokes before selection changing from a series or segment.
Declaration
public event EventHandler<ChartSelectionChangingEventArgs> SelectionChanging
Event Type
Type | Description |
---|---|
System.EventHandler<ChartSelectionChangingEventArgs> |
Remarks
SeriesBoundsChanged
Event correspond to plot area bound. It invokes when the plot area size changes.
Declaration
public event EventHandler<ChartSeriesBoundsEventArgs> SeriesBoundsChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ChartSeriesBoundsEventArgs> |