IDataSeries

StockSharp.Xaml.Charting.Model.DataSeries

Defines the base interface to a DataSeries which provides a data-source for BaseRenderableSeries

Implements: ISuspendable

Properties

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 dataseries

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 DataSeries has values (is not empty)

IsAttached : bool

Gets whether the current DataSeries is attached to a DataSet

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, resulting in a scrolling chart

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

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

Gets a synchronization object used to lock this data-series. Also locked on append, update, remove or clear

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 total extents of the IDataSeries in the X-Direction

XType : Type

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

XValues : IList

Gets the XValues of this dataseries

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 total extents of the IDataSeries in the Y-Direction

YType : Type

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

YValues : IList

Gets the YValues of this dataseries

Methods

Clear()

Clears the series, resetting internal lists to zero size

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

Returns: 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

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
maxXDistance
specifies search region in X units (ticks for DateTime or TimeSpan)

Returns: 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

Returns: 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, and an indefinite range otherwise

visibleRange
The VisibleRange to get the indices range

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

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
If true, returns an which only has positive values, e.g, when viewing a Logarithmic chart this value might be set

Returns: 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
If true, returns an which only has positive values, e.g, when viewing a Logarithmic chart this value might be set

Returns: 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

Returns: 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

Returns: The YRange of the data in this window

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
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

Returns: 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
visibleXRange
The VisibleRange of the XAxis at the time resampling occurs
factory
The PointResamplerFactory which returns IPointResampler instances
dataIsDisplayedAs2D
If true, then data is presented as a scatter series without relationship between the points, e.g. not a line series
pointSeriesArg
Additional parameter to the point series.

Returns: A IPointSeries which is used to render XY series

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

OBSOLETE: ToPointSeries overload has been deprecated, use ToPointSeries instead, and cast to correct type of point series

column
resamplingMode
pointRange
viewportWidth
isCategoryAxis

Events

DataSeriesChanged : EventHandler<DataSeriesChangedEventArgs>

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