ChartSeries
Represents the abstract base class for all chart series types that can be added to the Series collection of a RadChartBase.
Definition
Namespace:Telerik.Maui.Controls.Charts
Assembly:Telerik.Maui.Controls.dll
Syntax:
public abstract class ChartSeries : StyleableElement
Inheritance: objectChartSeries
Derived Classes:
Constructors
Initializes a new instance of the ChartSeries class.
public ChartSeries()
Fields
DisplayNameProperty
BindableProperty
Identifies the DisplayName bindable property.
public static readonly BindableProperty DisplayNameProperty
IsVisibleProperty
BindableProperty
Identifies the IsVisible bindable property.
public static readonly BindableProperty IsVisibleProperty
ItemsSourceProperty
BindableProperty
Identifies the ItemsSource bindable property.
public static readonly BindableProperty ItemsSourceProperty
LabelStyleProperty
BindableProperty
Identifies the LabelStyle bindable property.
public static readonly BindableProperty LabelStyleProperty
PlotAreaProperty
BindableProperty
Identifies the PlotArea bindable property.
public static readonly BindableProperty PlotAreaProperty
ShowLabelsProperty
BindableProperty
Identifies the ShowLabels bindable property.
public static readonly BindableProperty ShowLabelsProperty
StrokeProperty
BindableProperty
Identifies the Stroke bindable property.
public static readonly BindableProperty StrokeProperty
StrokeThicknessProperty
BindableProperty
Identifies the StrokeThickness bindable property.
public static readonly BindableProperty StrokeThicknessProperty
Properties
Gets or sets the display name presented for this series in chart legends, tooltips, and other UI surfaces that identify individual series to the user. This value has no effect on layout or rendering of the series data itself.
public string DisplayName { get; set; }
Gets or sets a value indicating whether this series participates in chart layout and rendering. Setting this property to false excludes the series from the plotted data entirely (including axis range calculation), as opposed to merely hiding its visuals, and triggers a chart redraw.
public bool IsVisible { get; set; }
Gets or sets the collection of data items rendered by this series. Each derived series type reads specific members from every item (for example via HorizontalBinding and VerticalBinding) to resolve the plotted values.
public IEnumerable ItemsSource { get; set; }
When the series is part of an active chart and the assigned collection implements INotifyCollectionChanged, the series automatically subscribes to CollectionChanged so that additions, removals, and resets trigger a chart redraw. The subscription is created and torn down as the series is attached to or detached from the chart, so assigning a new collection while the series is not attached does not leak subscriptions.
LabelStyle
Style
Gets or sets the font and color settings applied to the data point labels rendered when ShowLabels is true. Set to null (the default) to use the built-in appearance, in which the label text color matches the resolved series color and the font is 12 pt regular weight.
public Style LabelStyle { get; set; }
Gets or sets the named PlotArea that hosts this series when the owning chart defines multiple plot areas. Leave this property null to plot the series in the chart's default plot area (the first entry in PlotAreas, or an implicit single plot area when none are declared).
public ChartPlotArea PlotArea { get; set; }
Gets or sets a value indicating whether a text label is rendered next to each data point or segment of this series (for example the value above each bar, or the value near each line point). The label appearance can be customized through LabelStyle. The default value is false.
public bool ShowLabels { get; set; }
Stroke
Brush
Gets or sets the brush used to paint the outline of this series (the line stroke for line-like series, or the border of shapes for bar, area, pie, and donut series). Only values are currently supported by the rendering engine; other brush types are ignored. Set to null (the default) to resolve the stroke color automatically from the chart's Palette based on the series' position among its siblings.
public Brush Stroke { get; set; }
Gets or sets the thickness, in device-independent units, of the outline drawn with Stroke. Leave the value at its default of NaN to let the chart engine apply a type-specific default thickness (for example a thinner default for line series and a thicker default for bar outlines).
public double StrokeThickness { get; set; }
Methods
Called after the value of IsVisible changes. Override this method in a derived class to react to visibility changes beyond the default chart invalidation behavior already performed by the base implementation.
protected virtual void OnIsVisibleChanged()
Called after the value of ItemsSource changes. The base implementation unsubscribes from
change notifications on oldValue and, if the series is currently attached to a chart
and newValue implements INotifyCollectionChanged, subscribes to it.
Override this method to perform additional processing when the underlying data source is replaced.
protected virtual void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
The previously assigned data source, or null if none was set.
newValueIEnumerableThe newly assigned data source, or null to clear the series data.
Called when the collection currently assigned to ItemsSource raises CollectionChanged while the series is attached to a chart. The base implementation raises a property-changed notification for ItemsSource so that the owning chart invalidates and rebuilds its render model. Override this method to perform additional, more granular handling of collection mutations.
protected virtual void OnItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
The collection that raised the change notification.
eNotifyCollectionChangedEventArgsThe event data describing the change that occurred.