IDataSeries
Defines the base interface to a DataSeries which provides a data-source for BaseRenderableSeries
Implements: ISuspendable
Properties
public bool AcceptsUnsortedData { get; set; }
value = iDataSeries.AcceptsUnsortedData
iDataSeries.AcceptsUnsortedData = value
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.
public int Count { get; }
value = iDataSeries.Count
Gets the number of points in this dataseries
public DataSeriesType DataSeriesType { get; }
value = iDataSeries.DataSeriesType
Gets the DataSeriesType for this DataSeries
public int? FifoCapacity { get; set; }
value = iDataSeries.FifoCapacity
iDataSeries.FifoCapacity = value
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
public bool HasValues { get; }
value = iDataSeries.HasValues
Gets whether the DataSeries has values (is not empty)
public bool IsAttached { get; }
value = iDataSeries.IsAttached
Gets whether the current DataSeries is attached to a DataSet
public bool IsFifo { get; }
value = iDataSeries.IsFifo
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
public bool IsSecondary { get; }
value = iDataSeries.IsSecondary
If true, this data series will not be selected for chart range calculation.
public bool IsSorted { get; }
value = iDataSeries.IsSorted
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
public IComparable LatestYValue { get; }
value = iDataSeries.LatestYValue
Gets the latest Y-Value of the DataSeries
public IUltrachartSurface ParentSurface { get; set; }
value = iDataSeries.ParentSurface
iDataSeries.ParentSurface = value
Gets or sets the parent IUltrachartSurface which this IDataSeries instance is attached to
public string SeriesName { get; set; }
value = iDataSeries.SeriesName
iDataSeries.SeriesName = value
Gets or sets the name of this series
public Lock SyncRoot { get; }
value = iDataSeries.SyncRoot
Gets a synchronization object used to lock this data-series. Also locked on append, update, remove or clear
public IComparable XMax { get; }
value = iDataSeries.XMax
Gets the computed Maximum value in X for this series
public IComparable XMin { get; }
value = iDataSeries.XMin
Gets the computed Minimum value in X for this series
public IRange XRange { get; }
value = iDataSeries.XRange
Gets the total extents of the IDataSeries in the X-Direction
public Type XType { get; }
value = iDataSeries.XType
Gets the Type of X-data points in this DataSeries. Used to check compatibility with Axis types
public IList XValues { get; }
value = iDataSeries.XValues
Gets the XValues of this dataseries
public IComparable YMax { get; }
value = iDataSeries.YMax
Gets the computed Maximum value in Y for this series
public IComparable YMin { get; }
value = iDataSeries.YMin
Gets the computed Minimum value in Y for this series
public IRange YRange { get; }
value = iDataSeries.YRange
Gets the total extents of the IDataSeries in the Y-Direction
public Type YType { get; }
value = iDataSeries.YType
Gets the Type of Y-data points in this DataSeries. Used to check compatibility with Axis types
public IList YValues { get; }
value = iDataSeries.YValues
Gets the YValues of this dataseries
Methods
public void Clear()
iDataSeries.Clear()
Clears the series, resetting internal lists to zero size
public int FindClosestLine(IComparable x, IComparable y, double xyScaleRatio, double xRadius, LineDrawMode drawNanAs)
result = iDataSeries.FindClosestLine(x, y, xyScaleRatio, xRadius, drawNanAs)
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)
public int FindClosestPoint(IComparable x, IComparable y, double xyScaleRatio, double maxXDistance)
result = iDataSeries.FindClosestPoint(x, y, xyScaleRatio, maxXDistance)
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)
public int FindIndex(IComparable x, SearchMode searchMode)
result = iDataSeries.FindIndex(x, searchMode)
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
public IndexRange GetIndicesRange(IRange visibleRange)
result = iDataSeries.GetIndicesRange(visibleRange)
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
public IRange GetWindowedYRange(IRange xRange, bool getPositiveRange)
result = iDataSeries.GetWindowedYRange(xRange, getPositiveRange)
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
public IRange GetWindowedYRange(IndexRange xIndexRange, bool getPositiveRange)
result = iDataSeries.GetWindowedYRange(xIndexRange, getPositiveRange)
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
public IRange GetWindowedYRange(IndexRange xIndexRange)
result = iDataSeries.GetWindowedYRange(xIndexRange)
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
public IRange GetWindowedYRange(IRange xRange)
result = iDataSeries.GetWindowedYRange(xRange)
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
public void InvalidateParentSurface(RangeMode rangeMode)
iDataSeries.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
public HitTestInfo ToHitTestInfo(int index)
result = iDataSeries.ToHitTestInfo(index)
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
public IPointSeries ToPointSeries(ResamplingMode resamplingMode, IndexRange pointRange, int viewportWidth, bool isCategoryAxis, bool? dataIsDisplayedAs2D, IRange visibleXRange, IPointResamplerFactory factory, object pointSeriesArg)
result = iDataSeries.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
- 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
public IPointSeries ToPointSeries(IList column, ResamplingMode resamplingMode, IndexRange pointRange, int viewportWidth, bool isCategoryAxis)
result = iDataSeries.ToPointSeries(column, resamplingMode, pointRange, viewportWidth, isCategoryAxis)
OBSOLETE: ToPointSeries overload has been deprecated, use ToPointSeries instead, and cast to correct type of point series
- column
- resamplingMode
- pointRange
- viewportWidth
- isCategoryAxis
Events
public event EventHandler<DataSeriesChangedEventArgs> DataSeriesChanged
iDataSeries.DataSeriesChanged += handler
Event raised whenever points are added to, removed or one or more DataSeries properties changes