XyDataSeries

StockSharp.Xaml.Charting.Model.DataSeries

一个DataSeries存储 Xy 数据点,其中包含 X 和 Y 值,必须排序在 X 方向中。 可用于 DataSource 以及标准 XY 可转换序列类型

继承自: DataSeries<T, T>

实现: IXyDataSeries<T, T>, IDataSeries<T, T>, IDataSeries, ISuspendable, IXyDataSeries

构造函数

XyDataSeries
public XyDataSeries()
xyDataSeries = XyDataSeries()

初始化了 & ##XyDataSeries+# 类的新实例 。

属性

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

获得此 & # # # #DataSeriesType # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

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

获取数据序列是否有值( 不是空的)

方法

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

附加一个 X, Y 指向序列

x
X 值
yValues
Y 值( 取决于系列类型)
Append
public virtual void Append(IEnumerable<TX> x, IEnumerable<TY> y)
xyDataSeries.Append(x, y)

附加 X 列表, Y 指向序列

x
X 点列表
y
Y 点列表
Append
public virtual void Append(TX x, TY y)
xyDataSeries.Append(x, y)

附加一个 X, Y 指向序列

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

附加 X 列表, Y 指向序列

x
X 点列表
yValues
Y分列表( 取决于系列类型)
ClearColumns
protected override void ClearColumns()
xyDataSeries.ClearColumns()

当在某一类中被覆盖时, 清除数据序列中的所有列

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)

AutoRanging算法在内部使用。在某个衍生类中被覆盖时,可以得到最大值(existingYMax, currentMax),其中currentMax是指定索引中的最大值

index
基础数据集的索引
existingYMax
现有上限

返回值: 新的YMax,即Min(existingYMax,currentMax).

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

AutoRanging算法在内部使用。在生成类中被覆盖时,可以得到Min(existingYMin,currentMin),其中currentMin是指定索引中的最低值。

index
基础数据集的索引
existingYMin
现有最低限额

返回值: 新的YMIN,即Min(existingYMin,currentMin)), 即:

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

在指定的索引上插入 X, Y 点

index
插入的索引
x
X 值
y
Y 值
InsertRange
public virtual void InsertRange(int startIndex, IEnumerable<TX> x, IEnumerable<TY> y)
xyDataSeries.InsertRange(startIndex, x, y)

在指定的索引中插入 X, Y 点列表

startIndex
插入的索引
x
X 点列表
y
Y 点列表
RemoveAt
public override void RemoveAt(int index)
xyDataSeries.RemoveAt(index)

删除指定索引中的 X, Y 值

index
要删除的索引 :
RemoveRange
public override void RemoveRange(int startIndex, int count)
xyDataSeries.RemoveRange(startIndex, count)

删除从指定的索引开始的点范围

startIndex
开始删除元素范围的索引
count
要删除的元素数量
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)

将默认的 YValues 转换为用于渲染 XY 序列的 IPointSeries

resamplingMode
The desired ResamplingMode
pointRange
父数据集中的整数索引范围
viewportWidth
视图的当前宽度
isCategoryAxis
如果真实, 使用索引来组成被重印的 X 值, 否则使用 X 值本身
dataIsDisplayedAs2D
如果数据是真实的, 那么数据会被显示为散射序列, 而不在点之间发生关系, e.g 。 而不是行序列 。
visibleXRange
重作取样时的轴 VisibleRange
factory
The IPointResamplerFactory Instance
pointSeriesArg
点序列的附加参数.

返回值: 用于制取 XY 系列的 IPointSeries 相机

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

更新 X Value 指定的 X,Y 点。

x
更新时的 X 值为按键
y
新 Y 值