XyDataSeries

StockSharp.Xaml.Charting.Model.DataSeries

A DataSeries to store Xy data-points, containing X and Y values which must be sorted in the X-direction. May be used as a DataSource for as well as standard XY renderable series types

Inherits: DataSeries<T, T>

Implements: IXyDataSeries<T, T>, IDataSeries<T, T>, IDataSeries, ISuspendable, IXyDataSeries

Constructors

XyDataSeries
public XyDataSeries()
xyDataSeries = XyDataSeries()

Initializes a new instance of the XyDataSeries class.

Properties

DataSeriesType
public override DataSeriesType DataSeriesType { get; }
value = xyDataSeries.DataSeriesType

Gets the DataSeriesType for this DataSeries

HasValues
public override bool HasValues { get; }
value = xyDataSeries.HasValues

Gets whether the Data Series has values (is not empty)

Methods

Append
public override void Append(TX x, TY[] yValues)
xyDataSeries.Append(x, yValues)

Appends an X, Y point to the series

x
The X Value
yValues
The Y Values (depends on series type)
Append
public virtual void Append(IEnumerable<TX> x, IEnumerable<TY> y)
xyDataSeries.Append(x, y)

Appends a list of X, Y points to the series

x
The list of X points
y
The list of Y points
Append
public virtual void Append(TX x, TY y)
xyDataSeries.Append(x, y)

Appends an X, Y point to the series

x
The X Value
y
The Y Value
Append
public override void Append(IEnumerable<TX> x, IEnumerable<TY>[] yValues)
xyDataSeries.Append(x, yValues)

Appends a list of X, Y points to the series

x
The list of X points
yValues
Lists of Y points (depends on series type)
ClearColumns
protected override void ClearColumns()
xyDataSeries.ClearColumns()

When overridden in a derived class, clears all columns in the Data Series

Clone
public override IDataSeries<TX, TY> Clone()
result = xyDataSeries.Clone()

Creates a deep copy of a DataSeries

GetYMaxAt
public override TY GetYMaxAt(int index, TY existingYMax)
result = xyDataSeries.GetYMaxAt(index, existingYMax)

Used internally by AutoRanging algorithm. When overriden in a derived class, gets the Max(existingYMax, currentMax), where currentMax is the maximum at the specified index

index
The index to the underlying dataset
existingYMax
The existing maximum

Returns: The new YMax, which is the Min(existingYMax, currentMax)

GetYMinAt
public override TY GetYMinAt(int index, TY existingYMin)
result = xyDataSeries.GetYMinAt(index, existingYMin)

Used internally by AutoRanging algorithm. When overriden in a derived class, gets the Min(existingYMin, currentMin), where currentMin is the minimum at the specified index

index
The index to the underlying dataset
existingYMin
The existing minimum

Returns: The new YMin, which is the Min(existingYMin, currentMin)

Insert
public virtual void Insert(int index, TX x, TY y)
xyDataSeries.Insert(index, x, y)

Inserts an X,Y point at the specified index

index
The index to insert at
x
The X value
y
The Y value
InsertRange
public virtual void InsertRange(int startIndex, IEnumerable<TX> x, IEnumerable<TY> y)
xyDataSeries.InsertRange(startIndex, x, y)

Inserts a list of X, Y points at the specified index

startIndex
The index to insert at
x
The list of X points
y
The list of Y points
RemoveAt
public override void RemoveAt(int index)
xyDataSeries.RemoveAt(index)

Removes the X,Y values at the specified index

index
The index to remove at
RemoveRange
public override void RemoveRange(int startIndex, int count)
xyDataSeries.RemoveRange(startIndex, count)

Removes a range of points starting from the specified index

startIndex
Starting index of the range of elements to remove
count
The number of elements to remove
ToPointSeries
public override IPointSeries ToPointSeries(ResamplingMode resamplingMode, IndexRange pointRange, int viewportWidth, bool isCategoryAxis, bool? dataIsDisplayedAs2D, IRange visibleXRange, IPointResamplerFactory factory, object pointSeriesArg)
result = xyDataSeries.ToPointSeries(resamplingMode, pointRange, viewportWidth, isCategoryAxis, dataIsDisplayedAs2D, visibleXRange, factory, pointSeriesArg)

Converts the default YValues to an IPointSeries which is used to render XY series

resamplingMode
The desired ResamplingMode
pointRange
The integer Indices range in the parent data-set
viewportWidth
The current width of the viewport
isCategoryAxis
If true, uses the indices to form the resampled X-values, else uses the X-Values themselves
dataIsDisplayedAs2D
If true, then data is presented as a scatter series without relationship between the points, e.g. not a line series
visibleXRange
The XAxis VisibleRange at the time of resampling
factory
The IPointResamplerFactory Instance
pointSeriesArg
Additional parameter to the point series.

Returns: A IPointSeries which is used to render XY series

Update
public virtual void Update(TX x, TY y)
xyDataSeries.Update(x, y)

Updates an X,Y point specified by the X-Value passed in.

x
The X Value to key on when updating
y
The new Y value