SeriesBase Class
Provides the base class for a series.
[StyleTypedProperty(Property = "LabelStyle", StyleTargetType = typeof(DataPointLabel))]
public abstract class SeriesBase : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control Object
- Derived:
- XYSeriesBase
Constructors
SeriesBase()
Initializes a new instance of the SeriesBase class.
protected SeriesBase()
Properties
Index
Gets the index of this series in the associated chart. This is a dependency property.
public int Index { get; }
Property Value
- System.Int32:
The index of this series in the associated chart. The default value is
-1
.
ItemsSource
Gets or sets a collection used to generate the data points of the SeriesBase. This is a dependency property.
public IEnumerable ItemsSource { get; set; }
Property Value
- System.Collections.IEnumerable:
A collection used to generate the data points of the SeriesBase. The default value is
null
.
LabelAngle
Gets or sets the label angle.
public double LabelAngle { get; set; }
Property Value
- System.Double:
The label angle.
LabelFormat
Gets or sets the label format.
public string LabelFormat { get; set; }
Property Value
- System.String:
The label format.
Remarks
The format string will be passed the following parameters:
LabelFunc
Gets or sets the label function.
public Func<object, object, object, object, object, string> LabelFunc { get; set; }
Property Value
- System.Func<System.Object, System.Object, System.Object, System.Object, System.Object, System.String>:
The label function.
Remarks
This is a Func
that determines what the label text will be.
The parameters are primary axis value, secondary axis value, X axis value, Y axis value, and original value.
LabelStyle
Gets or sets the label style.
public Style LabelStyle { get; set; }
Property Value
- System.Windows.Style:
The label style.
LabelVisibility
Gets or sets the label visibility.
public LabelVisibility LabelVisibility { get; set; }
Property Value
- LabelVisibility:
The label visibility.
LogicalOrientation
Gets the logical orientation of the series.
public virtual Orientation LogicalOrientation { get; }
Property Value
- System.Windows.Controls.Orientation
Methods
GetLabelText(Object, Object, Object, Object, Object)
Gets the label text.
protected virtual string GetLabelText(object primaryValue, object secondaryValue, object xValue, object yValue, object originalValue)
Parameter | Type | Description |
---|---|---|
primaryValue | System.Object | The primary value. |
secondaryValue | System.Object | The secondary value. |
xValue | System.Object | The x value. |
yValue | System.Object | The y value. |
originalValue | System.Object | The original value. |
Returns
- System.String:
The text to apply to the label.
OnItemsSourceChanged(IEnumerable, IEnumerable)
Occurs when the ItemsSource value is changed.
protected virtual void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameter | Type | Description |
---|---|---|
oldValue | System.Collections.IEnumerable | Old value of the ItemsSource property. |
newValue | System.Collections.IEnumerable | New value of the ItemsSource property. |
OnItemsSourceCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Handles the CollectionChanged
event of the ItemsSource collection.
protected virtual void OnItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
sender | System.Object | The source of the event. |
e | System.Collections.Specialized.NotifyCollectionChangedEventArgs | The System.Collections.Specialized.NotifyCollectionChangedEventArgs instance containing the event data. |
Refresh()
Updates the series based on the current state.
public abstract void Refresh()
Fields
IndexProperty
Identifies the read-only Index dependency property. This field is read-only.
public static readonly DependencyProperty IndexProperty
ItemsSourceProperty
Identifies the ItemsSource dependency property. This field is read-only.
public static readonly DependencyProperty ItemsSourceProperty
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()