DataSeries

StockSharp.Xaml.Charting.Model.DataSeries

A generic abstract base class which defines a generic DataSeries which contains 1..N columns, such as X,Y in the case of plain X,Y data, or X, Open, High, Low, Close in the case of OHLC data.

Hereda de: BindableObject

Implementa: IDataSeries<T, T>, IDataSeries, ISuspendable

Constructores

DataSeries()

Initializes a new instance of the DataSeries class.

Propiedades

AcceptsUnsortedData : bool

New to v3.3: when AcceptsUnsortedData is false, the DataSeries with throw an InvalidOperationException if unsorted data is appended. Unintentional unsorted data can result in much slower performance. To disable this check, set AcceptsUnsortedData = true.

Count : int

Gets the number of points in this data series

DataDistributionCalculator : IDataDistributionCalculator<T>

Gets or Sets the DataDistrutionCalculator instance for this DataSeries. Used when resampling data to determine the correct algorithm

DataSeriesType : DataSeriesType

Gets the DataSeriesType for this DataSeries

FifoCapacity : int?

Gets or sets the size of the FIFO buffer. If null, then the dataseries is unlimited. If a value is set, when the point count reaches this value, older points will be discarded

HasValues : bool

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

IsAttached : bool

Gets a value indicating whether this instance is attached.

IsFifo : bool

Gets whether the dataseries behaves as a FIFO If True, when the FifoCapacity is reached, old points will be discarded in favour of new points

IsSecondary : bool

If true, this data series will not be selected for chart range calculation.

IsSorted : bool

Gets whether this DataSeries contains Sorted data in the X-direction. Note: Sorted data will result in far faster indexing operations. If at all possible, try to keep your data sorted in the X-direction

IsSuspended : bool

Gets a value indicating whether updates for the target are currently suspended

Item : T

Gets the item at the index from the specified DataSeriesColumn.

LatestYValue : IComparable

Gets the latest Y-Value of the DataSeries

ParentSurface : IUltrachartSurface

Gets or sets the parent IUltrachartSurface which this IDataSeries instance is attached to

SeriesName : string

Gets or sets the name of this series

SyncRoot : Lock

Synchronization object (per instance)

XMax : IComparable

Gets the computed Maximum value in X for this series

XMin : IComparable

Gets the computed Minimum value in X for this series

XRange : IRange

Gets the computed XRange, which is an IRange wrapping XMin and XMax properties

XType : Type

Gets the Type of X-data points in this DataSeries. Used to check compatibility with Axis types

XValues : IList<T>

Gets the X Values of this series

YMax : IComparable

Gets the computed Maximum value in Y for this series

YMin : IComparable

Gets the computed Minimum value in Y for this series

YRange : IRange

Gets the computed YRange, which is an IRange wrapping YMin and YMax properties

YType : Type

Gets the Type of Y-data points in this DataSeries. Used to check compatibility with Axis types

YValues : IList<T>

Gets the Y Values of this series

Métodos

Append(IEnumerable<T>, IEnumerable<T>[])

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)
Append(T, T[])

Appends an X, Y point to the series

x
The X Value
yValues
The Y Values (depends on series type)
Clear()

Clears the series, resetting internal lists to zero size

ClearColumns()

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

Clone() : IDataSeries<T, T>

Creates a deep copy of a DataSeries

DecrementSuspend()

Called by IUpdateSuspender each time a target suspender is disposed. When the final target suspender has been disposed, ResumeUpdates is called

FindClosestLine(IComparable, IComparable, double, double, LineDrawMode) : int

Finds the closest line to a point with given X and Y value. Search region is a vertical area with center in X and [maxXDistance] X units to left and right

x
The X-value of point [X data units, not pixels]
y
The Y-value of point [Y data units, not pixels]
xyScaleRatio
xUnitsPerPixel/yUnitsPerPixel
xRadius
specifies search region in X units (ticks for DateTime or TimeSpan)
drawNanAs
specifies how to handle NAN elements

Devuelve: The index of first point in line, -1 if not found (when count is zero)

FindClosestPoint(IComparable, IComparable, double, double) : int

Finds the closest point to a point with given X and Y value. Search region is a vertical area with center in X and [maxXDistance] X units to left and right

xValue
The X-value of point [X data units, not pixels]
yValue
The Y-value of point [Y data units, not pixels]
xyScaleRatio
xUnitsPerPixel/yUnitsPerPixel
hitTestRadius
Specifies search region in chart coordinates(ticks for DateTime or TimeSpan)

Devuelve: The index of the found value, -1 if not found (when count is zero)

FindIndex(IComparable, SearchMode) : int

Finds the index to the DataSeries at the specified X-Value

x
The X-value to search for
searchMode
The SearchMode options to use. Default is exact, where -1 is returned if the index is not found

Devuelve: The index of the found value

GetIndicesRange(IRange) : IndexRange

Gets the integer indices of the XValues array that are currently in the VisibleRange passed in.

range
The VisibleRange to get the indices range

Devuelve: The indices to the X-Data that are currently in range

GetPositiveMin``1(T, T)

Gets the minimum positive value of (positiveMin, min)

positiveMin
min
GetWindowedYRange(IRange, bool) : IRange

Gets the YRange of the data (min, max of the series) in the input visible range point range, where the input range is the VisibleRange

xRange
The X-Axis Range currently in view
getPositiveRange
Indicates whether to return positive YRange only

Devuelve: The YRange of the data in this window

GetWindowedYRange(IndexRange) : IRange

Gets the YRange of the data (min, max of the series) in the input IndexRange, where indices are point-indices on the DataSeries columns

xIndexRange
The X-Axis Indices currently in view

Devuelve: The YRange of the data in this window

GetWindowedYRange(IRange) : IRange

Gets the YRange of the data (min, max of the series) in the input visible range point range, where the input range is the VisibleRange

xRange
The X-Axis Range currently in view

Devuelve: The YRange of the data in this window

GetWindowedYRange(IndexRange, bool) : IRange

Gets the YRange of the data (min, max of the series) in the input IndexRange, where indices are point-indices on the DataSeries columns

xIndexRange
The X-Axis Indices currently in view
getPositiveRange
Indicates whether to return positive YRange only

Devuelve: The YRange of the data in this window

GetXMinAt(int, T) : T

When overriden in a derived class, gets the Min(existingXMin, currentMin), where currentMin is the minimum at the specified index

index
The index to the underlying dataset
existingXMin
The existing minimum

Devuelve: The new XMin, which is the Min(existingXMin, currentMin)

GetYMaxAt(int, T) : T

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

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

GetYMinAt(int, T) : T

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

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

InvalidateParentSurface(RangeMode)

May be called to trigger a redraw on the parent UltrachartSurface. This method is extremely useful when IDataSeries are in a ViewModel and bound via MVVM to IRenderableSeries. Please see the parameter for invalidation options

rangeMode
Provides RangeMode invalidation options for the parent surface
Remove(T)

Removes the associated Y-Values for the specified X-Value

x
The X DataValue to remove. Removes all associated Y-Values
RemoveAt(int)

Removes the X,Y values at the specified index

index
The index to remove at
RemoveRange(int, int)

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
ResumeUpdates(IUpdateSuspender)

Resumes updates on the target, intended to be called by IUpdateSuspender

suspender
SuspendUpdates() : IUpdateSuspender

Suspends drawing updates on the target until the returned object is disposed, when a final draw call will be issued

Devuelve: The disposable Update Suspender

ThrowWhenAppendInvalid(int)

Asserts correct number of parameters supplied to Append(TX, params TY) and throws if necessary

paramsCount
The expected params count
ToHitTestInfo(int) : HitTestInfo

When overridden in a derived class, returns a HitTestInfo struct containing data about the data-point at the specified index

index
The index to the DataSeries

Devuelve: The HitTestInfo

ToPointSeries(ResamplingMode, IndexRange, int, bool, bool?, IRange, IPointResamplerFactory, object) : IPointSeries

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 considered as a scatter series without relationship between the points, e.g. not a line series
visibleXRange
factory
The PointResamplerFactory which returns IPointResampler instances
pointSeriesArg
Additional parameter to the point series.

Devuelve: A IPointSeries which is used to render XY series

ToPointSeries(IList, ResamplingMode, IndexRange, int, bool) : IPointSeries

OBSOLETE. Use ToPointSeries instead, and cast to correct type of point series

column
resamplingMode
pointRange
viewportWidth
isCategoryAxis

Eventos

DataSeriesChanged : EventHandler<DataSeriesChangedEventArgs>

Event raised whenever points are added to, removed or one or more DataSeries properties changes

Campos

_xColumn : ISeriesColumn<T>

The XColumn for this DataSeries

_yColumn : ISeriesColumn<T>

The primary YColumn for this DataSeries