Show / Hide Table of Contents

Class Chart

Represents a control that displays a Chart.

Inheritance
System.Object
DependencyObject
UIElement
FrameworkElement
Control
Chart
Implements
ISeriesHost
IRequireSeriesHost
IResourceDictionaryDispenser
Inherited Members
Control.EnableBaseControlHandlingOfVisualStates
Control.ManageIsEnabled(Boolean)
Control.Background
Control.BackgroundProperty
Control.BorderBrush
Control.BorderBrushProperty
Control.BorderThickness
Control.BorderThicknessProperty
Control.FontWeight
Control.FontWeightProperty
Control.FontStyle
Control.FontStyleProperty
Control.Foreground
Control.ForegroundProperty
Control.FontFamily
Control.FontFamilyProperty
Control.FontSize
Control.FontSizeProperty
Control.TextDecorations
Control.TextDecorationsProperty
Control.Padding
Control.PaddingProperty
Control.HorizontalContentAlignment
Control.HorizontalContentAlignmentProperty
Control.VerticalContentAlignment
Control.VerticalContentAlignmentProperty
Control.TabIndex
Control.TabIndexProperty
Control.IsTabStop
Control.IsTabStopProperty
Control.TabNavigation
Control.TabNavigationProperty
Control.Template
Control.TemplateProperty
Control.ApplyTemplate()
Control.GetTemplateChild(String)
Control.Focus()
Control.HandlesScrolling
Control.OnGotFocus(RoutedEventArgs)
Control.OnLostFocus(RoutedEventArgs)
Control.CreateDomElement(Object, Object)
Control.CharacterSpacingProperty
Control.CharacterSpacing
Control.FontStretchProperty
Control.FontStretch
Control.OnDrop(DragEventArgs)
Control.OnDragEnter(DragEventArgs)
Control.OnDragLeave(DragEventArgs)
Control.OnTextInputUpdate(TextCompositionEventArgs)
Control.MeasureOverride(Size)
Control.ArrangeOverride(Size)
FrameworkElement.LayoutUpdated
FrameworkElement.SizeChanged
FrameworkElement.ResourceLookupMode
FrameworkElement.StyleProperty
FrameworkElement.Style
FrameworkElement.DefaultStyleKeyProperty
FrameworkElement.DefaultStyleKey
FrameworkElement.OverridesDefaultStyleProperty
FrameworkElement.OverridesDefaultStyle
FrameworkElement.OnVisualParentChanged(DependencyObject)
FrameworkElement.VisualChildrenCount
FrameworkElement.GetVisualChild(Int32)
FrameworkElement.Parent
FrameworkElement.AddLogicalChild(Object)
FrameworkElement.RemoveLogicalChild(Object)
FrameworkElement.LogicalChildren
FrameworkElement.TemplatedParent
FrameworkElement.Resources
FrameworkElement.IsLoaded
FrameworkElement.SetBinding(DependencyProperty, BindingBase)
FrameworkElement.SetBinding(DependencyProperty, Binding)
FrameworkElement.GetBindingExpression(DependencyProperty)
FrameworkElement.Cursor
FrameworkElement.CursorProperty
FrameworkElement.FindName(String)
FrameworkElement.Name
FrameworkElement.NameProperty
FrameworkElement.DataContext
FrameworkElement.DataContextProperty
FrameworkElement.DataContextChanged
FrameworkElement.Triggers
FrameworkElement.FlowDirectionProperty
FrameworkElement.FlowDirection
FrameworkElement.LanguageProperty
FrameworkElement.Language
FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs)
FrameworkElement.Tag
FrameworkElement.TagProperty
FrameworkElement.LoadedEvent
FrameworkElement.Loaded
FrameworkElement.Unloaded
FrameworkElement.BindingValidationError
FrameworkElement.ContextMenuProperty
FrameworkElement.ContextMenu
FrameworkElement.ContextMenuOpening
FrameworkElement.ToolTipProperty
FrameworkElement.ToolTip
FrameworkElement.INTERNAL_OnDetachedFromVisualTree()
FrameworkElement.INTERNAL_OnAttachedToVisualTree()
FrameworkElement.Height
FrameworkElement.HeightProperty
FrameworkElement.Width
FrameworkElement.WidthProperty
FrameworkElement.HorizontalAlignment
FrameworkElement.HorizontalAlignmentProperty
FrameworkElement.VerticalAlignment
FrameworkElement.VerticalAlignmentProperty
FrameworkElement.Margin
FrameworkElement.MarginProperty
FrameworkElement.MinHeight
FrameworkElement.MinHeightProperty
FrameworkElement.MinWidth
FrameworkElement.MinWidthProperty
FrameworkElement.MaxHeight
FrameworkElement.MaxHeightProperty
FrameworkElement.MaxWidth
FrameworkElement.MaxWidthProperty
FrameworkElement.ActualWidthProperty
FrameworkElement.ActualWidth
FrameworkElement.ActualHeightProperty
FrameworkElement.ActualHeight
UIElement.TransformToVisual(UIElement)
UIElement.OnCreateAutomationPeer()
UIElement.RenderSize
UIElement.DesiredSize
UIElement.InvalidateMeasure()
UIElement.InvalidateArrange()
UIElement.Measure(Size)
UIElement.Arrange(Rect)
UIElement.UpdateLayout()
UIElement.DragEnter
UIElement.DragLeave
UIElement.Drop
UIElement.DragOver
UIElement.CacheMode
UIElement.CacheModeProperty
UIElement.Projection
UIElement.ProjectionProperty
UIElement.VisualParent
UIElement.AddVisualChild(UIElement)
UIElement.RemoveVisualChild(UIElement)
UIElement.OnVisualChildrenChanged(DependencyObject, DependencyObject)
UIElement.XamlSourcePath
UIElement.ClipToBounds
UIElement.ClipToBoundsProperty
UIElement.ClipProperty
UIElement.Clip
UIElement.IsEnabledProperty
UIElement.IsEnabled
UIElement.IsEnabledChanged
UIElement.EffectProperty
UIElement.Effect
UIElement.RenderTransformProperty
UIElement.RenderTransform
UIElement.RenderTransformOriginProperty
UIElement.RenderTransformOrigin
UIElement.UseLayoutRounding
UIElement.UseLayoutRoundingProperty
UIElement.Visibility
UIElement.VisibilityProperty
UIElement.IsVisibleProperty
UIElement.IsVisible
UIElement.IsVisibleChanged
UIElement.OpacityProperty
UIElement.Opacity
UIElement.OpacityMaskProperty
UIElement.OpacityMask
UIElement.IsHitTestVisible
UIElement.IsHitTestVisibleProperty
UIElement.AllowDrop
UIElement.AllowDropProperty
UIElement.CaptureMouse()
UIElement.IsMouseCaptured
UIElement.ReleaseMouseCapture()
UIElement.AllowScrollOnTouchMove
UIElement.AllowScrollOnTouchMoveProperty
UIElement.AddHandler(RoutedEvent, Delegate, Boolean)
UIElement.RemoveHandler(RoutedEvent, Delegate)
UIElement.MouseMoveEvent
UIElement.MouseMove
UIElement.OnMouseMove(MouseEventArgs)
UIElement.MouseLeftButtonDownEvent
UIElement.MouseLeftButtonDown
UIElement.OnMouseLeftButtonDown(MouseButtonEventArgs)
UIElement.MouseRightButtonDownEvent
UIElement.MouseRightButtonDown
UIElement.OnMouseRightButtonDown(MouseButtonEventArgs)
UIElement.MouseWheelEvent
UIElement.MouseWheel
UIElement.OnMouseWheel(MouseWheelEventArgs)
UIElement.MouseLeftButtonUpEvent
UIElement.MouseLeftButtonUp
UIElement.OnMouseLeftButtonUp(MouseButtonEventArgs)
UIElement.MouseEnterEvent
UIElement.MouseEnter
UIElement.OnMouseEnter(MouseEventArgs)
UIElement.MouseLeaveEvent
UIElement.MouseLeave
UIElement.OnMouseLeave(MouseEventArgs)
UIElement.TextInputStartEvent
UIElement.TextInputStart
UIElement.OnTextInputStart(TextCompositionEventArgs)
UIElement.TextInputEvent
UIElement.TextInput
UIElement.OnTextInput(TextCompositionEventArgs)
UIElement.TextInputUpdateEvent
UIElement.TextInputUpdate
UIElement.TappedEvent
UIElement.Tapped
UIElement.OnTapped(TappedRoutedEventArgs)
UIElement.MouseRightButtonUpEvent
UIElement.MouseRightButtonUp
UIElement.OnMouseRightButtonUp(MouseButtonEventArgs)
UIElement.KeyDownEvent
UIElement.KeyDown
UIElement.OnKeyDown(KeyEventArgs)
UIElement.KeyUpEvent
UIElement.KeyUp
UIElement.OnKeyUp(KeyEventArgs)
UIElement.GotFocusEvent
UIElement.GotFocus
UIElement.LostFocusEvent
UIElement.LostFocus
UIElement.LostMouseCapture
UIElement.OnLostMouseCapture(MouseEventArgs)
UIElement.INTERNAL_AttachToDomEvents()
UIElement.INTERNAL_DetachFromDomEvents()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls.DataVisualization.Charting
Assembly: OpenSilver.Controls.DataVisualization.Toolkit.dll
Syntax
[TemplatePart(Name = "ChartArea", Type = typeof(EdgePanel))]
[TemplatePart(Name = "Legend", Type = typeof(Legend))]
[StyleTypedProperty(Property = "TitleStyle", StyleTargetType = typeof(Title))]
[StyleTypedProperty(Property = "LegendStyle", StyleTargetType = typeof(Legend))]
[StyleTypedProperty(Property = "ChartAreaStyle", StyleTargetType = typeof(EdgePanel))]
[StyleTypedProperty(Property = "PlotAreaStyle", StyleTargetType = typeof(Grid))]
public class Chart : Control, IControl, IFrameworkElement, IUIElement, IDependencyObject, ISeriesHost, IRequireSeriesHost, IResourceDictionaryDispenser

Constructors

| Improve this Doc View Source

Chart()

Initializes a new instance of the Chart class.

Declaration
public Chart()

Fields

| Improve this Doc View Source

ChartAreaStyleProperty

Identifies the ChartAreaStyle dependency property.

Declaration
public static readonly DependencyProperty ChartAreaStyleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LegendStyleProperty

Identifies the LegendStyle dependency property.

Declaration
public static readonly DependencyProperty LegendStyleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

LegendTitleProperty

Identifies the LegendTitle dependency property.

Declaration
public static readonly DependencyProperty LegendTitleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

PaletteProperty

Identifies the Palette dependency property.

Declaration
public static readonly DependencyProperty PaletteProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

PlotAreaStyleProperty

Identifies the PlotAreaStyle dependency property.

Declaration
public static readonly DependencyProperty PlotAreaStyleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

TitleProperty

Identifies the Title dependency property.

Declaration
public static readonly DependencyProperty TitleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

TitleStyleProperty

Identifies the TitleStyle dependency property.

Declaration
public static readonly DependencyProperty TitleStyleProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

ActualAxes

Gets the actual axes displayed in the chart.

Declaration
public ReadOnlyCollection<IAxis> ActualAxes { get; }
Property Value
Type Description
System.Collections.ObjectModel.ReadOnlyCollection<IAxis>
| Improve this Doc View Source

Axes

Gets or sets a collection of Axes in the Chart.

Declaration
public Collection<IAxis> Axes { get; set; }
Property Value
Type Description
System.Collections.ObjectModel.Collection<IAxis>
| Improve this Doc View Source

BackgroundElements

Gets the collection of background elements.

Declaration
protected ObservableCollection<UIElement> BackgroundElements { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<UIElement>
| Improve this Doc View Source

ChartAreaStyle

Gets or sets the Style of the ISeriesHost's ChartArea.

Declaration
public Style ChartAreaStyle { get; set; }
Property Value
Type Description
Style
| Improve this Doc View Source

ForegroundElements

Gets the collection of foreground elements.

Declaration
protected ObservableCollection<UIElement> ForegroundElements { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<UIElement>
| Improve this Doc View Source

LegendItems

Gets the collection of legend items.

Declaration
public Collection<object> LegendItems { get; }
Property Value
Type Description
System.Collections.ObjectModel.Collection<System.Object>
| Improve this Doc View Source

LegendStyle

Gets or sets the Style of the ISeriesHost's Legend.

Declaration
public Style LegendStyle { get; set; }
Property Value
Type Description
Style
| Improve this Doc View Source

LegendTitle

Gets or sets the Title content of the Legend.

Declaration
public object LegendTitle { get; set; }
Property Value
Type Description
System.Object
| Improve this Doc View Source

Palette

Gets or sets a palette of ResourceDictionaries used by the children of the Chart.

Declaration
public Collection<ResourceDictionary> Palette { get; set; }
Property Value
Type Description
System.Collections.ObjectModel.Collection<ResourceDictionary>
| Improve this Doc View Source

PlotAreaStyle

Gets or sets the Style of the ISeriesHost's PlotArea.

Declaration
public Style PlotAreaStyle { get; set; }
Property Value
Type Description
Style
| Improve this Doc View Source

Series

Gets or sets the collection of Series displayed by the Chart.

Declaration
public Collection<ISeries> Series { get; set; }
Property Value
Type Description
System.Collections.ObjectModel.Collection<ISeries>
| Improve this Doc View Source

SeriesHost

Gets or sets the Series host of the chart.

Declaration
protected ISeriesHost SeriesHost { get; set; }
Property Value
Type Description
ISeriesHost
Remarks

This will always return null.

| Improve this Doc View Source

Title

Gets or sets the title displayed for the Chart.

Declaration
public object Title { get; set; }
Property Value
Type Description
System.Object
| Improve this Doc View Source

TitleStyle

Gets or sets the Style of the ISeriesHost's Title.

Declaration
public Style TitleStyle { get; set; }
Property Value
Type Description
Style

Methods

| Improve this Doc View Source

GetResourceDictionariesWhere(Func<ResourceDictionary, Boolean>)

Returns a rotating enumerator of ResourceDictionary objects that coordinates with the dispenser object to ensure that no two enumerators are on the same item. If the dispenser is reset or its collection is changed then the enumerators are also reset.

Declaration
public IEnumerator<ResourceDictionary> GetResourceDictionariesWhere(Func<ResourceDictionary, bool> predicate)
Parameters
Type Name Description
System.Func<ResourceDictionary, System.Boolean> predicate

A predicate that returns a value indicating whether to return an item.

Returns
Type Description
System.Collections.Generic.IEnumerator<ResourceDictionary>

An enumerator of ResourceDictionaries.

| Improve this Doc View Source

OnApplyTemplate()

Builds the visual tree for the Chart control when a new template is applied.

Declaration
public override void OnApplyTemplate()
Overrides
Control.OnApplyTemplate()

Events

| Improve this Doc View Source

ResourceDictionariesChanged

Event that is invoked when the ResourceDictionaryDispenser's collection has changed.

Declaration
public event EventHandler ResourceDictionariesChanged
Event Type
Type Description
System.EventHandler

Explicit Interface Implementations

| Improve this Doc View Source

IRequireSeriesHost.SeriesHost

Gets or sets the Series host of the chart.

Declaration
ISeriesHost IRequireSeriesHost.SeriesHost { get; set; }
Returns
Type Description
ISeriesHost
Remarks

This will always return null.

| Improve this Doc View Source

ISeriesHost.Axes

Gets the axes collection of the chart.

Declaration
ObservableCollection<IAxis> ISeriesHost.Axes { get; }
Returns
Type Description
System.Collections.ObjectModel.ObservableCollection<IAxis>
| Improve this Doc View Source

ISeriesHost.BackgroundElements

Gets the collection of background elements.

Declaration
ObservableCollection<UIElement> ISeriesHost.BackgroundElements { get; }
Returns
Type Description
System.Collections.ObjectModel.ObservableCollection<UIElement>
| Improve this Doc View Source

ISeriesHost.ForegroundElements

Gets the collection of foreground elements.

Declaration
ObservableCollection<UIElement> ISeriesHost.ForegroundElements { get; }
Returns
Type Description
System.Collections.ObjectModel.ObservableCollection<UIElement>
| Improve this Doc View Source

ISeriesHost.Series

Gets the Series collection of the chart.

Declaration
ObservableCollection<ISeries> ISeriesHost.Series { get; }
Returns
Type Description
System.Collections.ObjectModel.ObservableCollection<ISeries>

Implements

ISeriesHost
IRequireSeriesHost
IResourceDictionaryDispenser

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
UIElementExtendedRoutedEventExtensions.AddHandler(UIElement, ExtendedRoutedEvent, Delegate, Boolean)
UIElementExtendedRoutedEventExtensions.RemoveHandler(UIElement, ExtendedRoutedEvent, Delegate)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
VisualTreeExtensions.GetBoundsRelativeTo(FrameworkElement, UIElement)
VisualTreeExtensions.InvokeOnLayoutUpdated(FrameworkElement, Action)
  • Improve this Doc
  • View Source