DataSeries

StockSharp.Xaml.Charting.Model.DataSeries

通用抽象基类定义了通用的DataSeries,包含有1..N列,如平方 X,Y数据为X,或X, Open, High, Low, Close, 如OHLC数据为X.

继承自: BindableObject

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

构造函数

DataSeries
protected DataSeries()
dataSeries = DataSeries()

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

属性

AcceptsUnsortedData
public bool AcceptsUnsortedData { get; set; }
value = dataSeries.AcceptsUnsortedData
dataSeries.AcceptsUnsortedData = value

新建到 v3.3: 当 AcceptsUnsortedData 错误时, 如果附加了不排序的数据, 则会丢出 InvalidOperationException 的 DataSeries 。 无意图的不排序数据会导致性能更慢。 要禁用此检查, 请设置 AcceptsUnsortedData = 真值 。

Count
public int Count { get; }
value = dataSeries.Count

获得此数据序列中的分数

DataDistributionCalculator
public IDataDistributionCalculator<TX> DataDistributionCalculator { get; set; }
value = dataSeries.DataDistributionCalculator
dataSeries.DataDistributionCalculator = value

获取或设置此 DataDistrutionCalculator 实例 。 当重新复制数据以确定正确的算法时, 使用此实例 。

DataSeriesType
public abstract DataSeriesType DataSeriesType { get; }
value = dataSeries.DataSeriesType

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

FifoCapacity
public int? FifoCapacity { get; set; }
value = dataSeries.FifoCapacity
dataSeries.FifoCapacity = value

获取或设置 FIFO 缓冲器的大小。 如果无效, 数据序列是无限的。 如果设定了值, 当点数达到此值时, 将丢弃旧点 。

HasValues
public abstract bool HasValues { get; }
value = dataSeries.HasValues

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

IsAttached
public bool IsAttached { get; }
value = dataSeries.IsAttached

获得一个值,显示是否附加了此实例 。

IsFifo
public bool IsFifo { get; }
value = dataSeries.IsFifo

获取数据序列是否作为 FIFO 行为 如果 True, 当 FifoCapacity 到达时, 旧点将被丢弃, 以选择新点

IsSecondary
public virtual bool IsSecondary { get; set; }
value = dataSeries.IsSecondary
dataSeries.IsSecondary = value

如果选中的话, 此数据序列将不选择用于图表区域计算 。

IsSorted
public bool IsSorted { get; }
value = dataSeries.IsSorted

获取此% 1 是否包含 X 方向中排序的数据 。 注意 : 排序后的数据将会导致索引操作速度更快 。 如果可能, 请尽量将您的数据排序保存在 X 方向中 。

IsSuspended
public bool IsSuspended { get; }
value = dataSeries.IsSuspended

获得一个值,显示当前是否暂停目标更新

Item
public TY Item { get; }
value = dataSeries.Item

从指定的 DataSeriesColumn 中获取索引中的项目。

LatestYValue
public IComparable LatestYValue { get; }
value = dataSeries.LatestYValue

获得 DataSeries 的最新 Y 值

ParentSurface
public IUltrachartSurface ParentSurface { get; set; }
value = dataSeries.ParentSurface
dataSeries.ParentSurface = value

获取或设置此 IDataSeries 实例所附带的父 IUltrachartSurface 实例

SeriesName
public string SeriesName { get; set; }
value = dataSeries.SeriesName
dataSeries.SeriesName = value

获取或设置此系列的名称

SyncRoot
public Lock SyncRoot { get; }
value = dataSeries.SyncRoot

同步对象( 逐例)

XMax
public IComparable XMax { get; }
value = dataSeries.XMax

获得该系列的最大值 X

XMin
public IComparable XMin { get; }
value = dataSeries.XMin

获得该系列的计算值 X 中的最低值

XRange
public virtual IRange XRange { get; }
value = dataSeries.XRange

获得计算出来的 X Range, 即 iRange 包接 XMin 和 XMax 属性

XType
public Type XType { get; }
value = dataSeries.XType

获取此 X- 数据点的类型 {}。 用于检查与轴类型是否兼容 。

XValues
public IList<TX> XValues { get; }
value = dataSeries.XValues

获得此系列的 X 值

YMax
public IComparable YMax { get; }
value = dataSeries.YMax

获得此系列的最大值 Y 的计算值

YMin
public IComparable YMin { get; }
value = dataSeries.YMin

获得此系列的计算最小值 Y

YRange
public virtual IRange YRange { get; }
value = dataSeries.YRange

获得计算 YRange, 即IRang 包接 YMIN 和 YMax 属性

YType
public Type YType { get; }
value = dataSeries.YType

获取此 DataSeries 中的 Y 数据点类型。 用于检查与轴类型是否兼容 。

YValues
public IList<TY> YValues { get; }
value = dataSeries.YValues

获得本系列的 Y 值

方法

Append
public abstract void Append(IEnumerable<TX> x, IEnumerable<TY>[] yValues)
dataSeries.Append(x, yValues)

附加 X 列表, Y 指向序列

x
X 点列表
yValues
Y分列表( 取决于系列类型)
Append
public abstract void Append(TX x, TY[] yValues)
dataSeries.Append(x, yValues)

附加一个 X, Y 指向序列

x
X 值
yValues
Y 值( 取决于系列类型)
Clear
public void Clear()
dataSeries.Clear()

清除序列, 将内部列表重置为零大小

ClearColumns
protected abstract void ClearColumns()
dataSeries.ClearColumns()

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

Clone
public abstract IDataSeries<TX, TY> Clone()
result = dataSeries.Clone()

Creates a deep copy of a DataSeries

DecrementSuspend
public void DecrementSuspend()
dataSeries.DecrementSuspend()

每次处置目标悬浮器时, IUpdateSuspender 都会被调用。 当最终目标悬浮器被处理后, ResumeUpdates 被调用 。

FindClosestLine
public virtual int FindClosestLine(IComparable x, IComparable y, double xyScaleRatio, double xRadius, LineDrawMode drawNanAs)
result = dataSeries.FindClosestLine(x, y, xyScaleRatio, xRadius, drawNanAs)

查找最接近一个点的有给定的 X 和 Y 值的行。 搜索区域是一个垂直区域, 中心位于 X 和 [maxXDistance] X 单位位于左后方和右后方

x
点的 X 值 [X 数据单位, 不是像素]
y
点的 Y 值 [Y 数据单位, 不为像素]
xyScaleRatio
xUnitsPerPixel/yUnitsPerPixel
xRadius
指定 X 单位中的搜索区域(DateTime 或 TimeSpan 的缩写)
drawNanAs
指定如何处理 NAN 元素

返回值: 线条中第一点的索引, -1 如果找不到的话( 当数为零时)

FindClosestPoint
public virtual int FindClosestPoint(IComparable xValue, IComparable yValue, double xyScaleRatio, double hitTestRadius)
result = dataSeries.FindClosestPoint(xValue, yValue, xyScaleRatio, hitTestRadius)

查找一个点的最接近点, 并给出 X 和 Y 值。 搜索区域是一个垂直区域, 中心位于 X 和 [maxXDistance] X 单位位于左后方

xValue
点的 X 值 [X 数据单位, 不是像素]
yValue
点的 Y 值 [Y 数据单位, 不为像素]
xyScaleRatio
xUnitsPerPixel/yUnitsPerPixel
hitTestRadius
在图表坐标( \\ DateTime\\ 或\\ TimeSpan\ ) 中指定搜索区域 。

返回值: 找到值的索引, -1 如果找不到( 当计数为零)

FindIndex
public int FindIndex(IComparable x, SearchMode searchMode)
result = dataSeries.FindIndex(x, searchMode)

在指定的 X Value 查找 DataSeries 的索引

x
要搜索的 X 值
searchMode
SearchMode 选项用于。 默认是准确的, 如果找不到索引, 则返回 - 1 的位置

返回值: 已找到值的索引

GetIndicesRange
public IndexRange GetIndicesRange(IRange range)
result = dataSeries.GetIndicesRange(range)

获取目前在 VisibleRange 中的 XVALES 数组的整数指数。

range
获取指数范围的 VisibleRange

返回值: 目前在幅度内的 X-数据索引

GetPositiveMin``1
protected T GetPositiveMin<T>(T positiveMin, T min)
result = dataSeries.GetPositiveMin(positiveMin, min)

获得最小正值为 (%% positiveMin%%%, 分钟)

positiveMin
min
GetWindowedYRange
public IRange GetWindowedYRange(IRange xRange, bool getPositiveRange)
result = dataSeries.GetWindowedYRange(xRange, getPositiveRange)

获取输入可见范围点范围内的数据(最小, 最大序列) Y 范围, 其中输入范围为 VisibleRange

xRange
目前所看到的 X 轴范围
getPositiveRange
表示是否只返回正 YRange 。

返回值: 此窗口中数据的 Y 长程

GetWindowedYRange
public IRange GetWindowedYRange(IndexRange xIndexRange)
result = dataSeries.GetWindowedYRange(xIndexRange)

获取输入 IndexRange 中的数据的Y Range(最小, 最大序列), 其中的指数为 DataSeries 列的点指数

xIndexRange
目前查看的 X 轴索引

返回值: 此窗口中数据的 Y 长程

GetWindowedYRange
public IRange GetWindowedYRange(IRange xRange)
result = dataSeries.GetWindowedYRange(xRange)

获取输入可见范围点范围内的数据(最小, 最大序列) Y 范围, 其中输入范围为 VisibleRange

xRange
目前所看到的 X 轴范围

返回值: 此窗口中数据的 Y 长程

GetWindowedYRange
public IRange GetWindowedYRange(IndexRange xIndexRange, bool getPositiveRange)
result = dataSeries.GetWindowedYRange(xIndexRange, getPositiveRange)

获取输入 IndexRange 中的数据的Y Range(最小, 最大序列), 其中的指数为 DataSeries 列的点指数

xIndexRange
目前查看的 X 轴索引
getPositiveRange
表示是否只返回正 YRange 。

返回值: 此窗口中数据的 Y 长程

GetXMinAt
public TX GetXMinAt(int index, TX existingXMin)
result = dataSeries.GetXMinAt(index, existingXMin)

当在衍生类中被覆盖时, 可获得 Min(%% existingXMin+%,% currentMin+%), 其中的% currentMin+%% 是指定索引中最小的

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

返回值: 新的 XMIN,即: Min(existingXMin,currentMin) 。

GetYMaxAt
public abstract TY GetYMaxAt(int index, TY existingYMax)
result = dataSeries.GetYMaxAt(index, existingYMax)

当在衍生类中被覆盖时,获得最大值(existingYMax,currentMax),其中currentMax是指定索引中的最大值

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

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

GetYMinAt
public abstract TY GetYMinAt(int index, TY existingYMin)
result = dataSeries.GetYMinAt(index, existingYMin)

当在衍生类中被覆盖时, 可获得 Min(%% existingYMin+%,% currentMin+%), 其中的% currentMin+%% 是指定索引中最小的

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

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

InvalidateParentSurface
public void InvalidateParentSurface(RangeMode rangeMode)
dataSeries.InvalidateParentSurface(rangeMode)

可能调用以触发父 UltrachartSurface 重画。 当 IDataSeries 处于 ViewModel 中并通过 MVVM 绑定到 IRenderableSeries 时, 此方法极为有用 。 请查看无效选项的参数 。

rangeMode
为母面提供 RangeMode 无效选项
Remove
public void Remove(TX x)
dataSeries.Remove(x)

删除指定的 X value 的相关 Y 值

x
要删除的 X DataValue 。 删除所有关联的 Y 值
RemoveAt
public abstract void RemoveAt(int index)
dataSeries.RemoveAt(index)

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

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

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

startIndex
开始删除元素范围的索引
count
要删除的元素数量
ResumeUpdates
public void ResumeUpdates(IUpdateSuspender suspender)
dataSeries.ResumeUpdates(suspender)

续集目标更新,计划由IUpdateSuspender调用

suspender
SuspendUpdates
public IUpdateSuspender SuspendUpdates()
result = dataSeries.SuspendUpdates()

悬停绘制目标上的最新消息, 直至返回对象处理完毕, 此时将发出最后的绘图调用

返回值: 可支配更新悬浮器

ThrowWhenAppendInvalid
protected void ThrowWhenAppendInvalid(int paramsCount)
dataSeries.ThrowWhenAppendInvalid(paramsCount)

确定向附录(TX,参数TY)提供的参数正确数量,并在必要时投出

paramsCount
需要的参数数
ToHitTestInfo
public virtual HitTestInfo ToHitTestInfo(int index)
result = dataSeries.ToHitTestInfo(index)

当在衍生类中被覆盖时, 返回包含指定索引数据点的 HitTestInfo 结构

index
The index to the DataSeries

返回值: HitTestInfo

ToPointSeries
public abstract IPointSeries ToPointSeries(ResamplingMode resamplingMode, IndexRange pointRange, int viewportWidth, bool isCategoryAxis, bool? dataIsDisplayedAs2D, IRange visibleXRange, IPointResamplerFactory factory, object pointSeriesArg)
result = dataSeries.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
factory
返回 IPointResampler 实例的 PointResamplerFactory
pointSeriesArg
点序列的附加参数.

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

ToPointSeries
public IPointSeries ToPointSeries(IList column, ResamplingMode resamplingMode, IndexRange pointRange, int viewportWidth, bool isCategoryAxis)
result = dataSeries.ToPointSeries(column, resamplingMode, pointRange, viewportWidth, isCategoryAxis)

使用 ToPointSeries 代替,并投放以正确点序列类型

column
resamplingMode
pointRange
viewportWidth
isCategoryAxis

事件

DataSeriesChanged
public event EventHandler<DataSeriesChangedEventArgs> DataSeriesChanged
dataSeries.DataSeriesChanged += handler

当点被添加、去除或一个或多个 & ###DataSeries+#% 属性变化时, 事件会上升

字段

_xColumn
protected ISeriesColumn<TX> _xColumn
value = dataSeries._xColumn

The XColumn for this DataSeries

_yColumn
protected ISeriesColumn<TY> _yColumn
value = dataSeries._yColumn

这部电影的YColumn主要内容是: