Class TimeSeries
Base for time series. This class is NOT thread-safe
Inheritance
System.Object
TimeSeries
Implements
System.IDisposable
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()
Assembly: Azos.WinForms.dll
public abstract class TimeSeries : DisposableObject, IDisposable, INamed, IOrdered
Constructors
Declaration
protected TimeSeries(string name, int order, TimeSeries parent = null)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Int32 |
order |
|
TimeSeries |
parent |
|
Fields
Declaration
public const int MAX_SAMPLES_DEFAULT = 32768
Field Value
Type |
Description |
System.Int32 |
|
Declaration
public const int MAX_SAMPLES_MIN = 16
Field Value
Type |
Description |
System.Int32 |
|
Properties
Returns the children of this series
Declaration
public IOrderedRegistry<TimeSeries> Children { get; }
Property Value
Returns data in the series in natural time order
Declaration
public IEnumerable<ITimeSeriesSample> Data { get; }
Property Value
Returns data in the series in the reveresed time order
Declaration
public IEnumerable<ITimeSeriesSample> DataReveresed { get; }
Property Value
Declaration
public int MaxSamples { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
Series order in the list of orders
Declaration
public int Order { get; }
Property Value
Type |
Description |
System.Int32 |
|
Returns parent of this series or null
Declaration
public TimeSeries Parent { get; }
Property Value
Sample count in this series, excluding children
Declaration
public int SampleCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Views that visualize the series data (may be more than one),
for example a market data may have 3 views that show open.close and volume as 3 views based on the same source
Declaration
public OrderedRegistry<SeriesView> Views { get; }
Property Value
Declaration
public bool Visible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Returns the registry of horizontal levels on Y access
Declaration
public OrderedRegistry<TimeSeries.YLevel> YLevels { get; }
Property Value
Methods
Adds sample to the series at the appropriate position.
This method respects MaxSamples and first deletes older samples making room for new additions
Declaration
protected void Add(ITimeSeriesSample sample)
Parameters
Declaration
Deletes sample from the set. This method is not efficient as it does linear list scan
Declaration
public bool Delete(ITimeSeriesSample sample)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Declaration
protected override void Destructor()
Overrides
Returns the maximum width of one sample extracted from all views
Declaration
public int GetMaxSampleWidth(bool includeChildren = true)
Parameters
Type |
Name |
Description |
System.Boolean |
includeChildren |
|
Returns
Type |
Description |
System.Int32 |
|
Gets a list of distinct pane names ordered by occurence in this and all child series if includeChildren is true
Declaration
public IEnumerable<string> GetPaneNames(bool includeChildren = true)
Parameters
Type |
Name |
Description |
System.Boolean |
includeChildren |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Returns last X data samples in the series in natural order. It may return less samples than X
Declaration
public IEnumerable<ITimeSeriesSample> LastXSamplesData(int x)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
Returns
Replace last data sample.
This function requires that the new sample has the same timestamp
as the last sample in the time series data.
Declaration
public void ReplaceLast(ITimeSeriesSample sample)
Parameters
Declaration
public void ReplaceSamples(IEnumerable<ITimeSeriesSample> data)
Parameters
Implements
System.IDisposable
Extension Methods