Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines the interface to a DataSeries in SciChart's High Performance Real-time JavaScript Charts

remarks

A DataSeries stores the data to render. This is independent from the RenderableSeries which defines how that data should be rendered.

See derived types of BaseDataSeries to find out what data-series are available. See derived types of IRenderableSeries to find out what 2D JavaScript Chart types are available.

Hierarchy

Implemented by

Index

Properties

Readonly changeCount

changeCount: number

Gets the change count for this data series. Allows to indentify when data series was changed

containsNaN

containsNaN: boolean

Gets or sets whether the Y data contains NaN values. Set containsNaN = false for the performance optimization when the series has no NaNs

dataChanged

An EventHandler which is raised when the data changes.

remarks

To subscribe to dataChanged, use the following code:

const dataSeries = new XyDataSeries(wasmContext);
const callback = () => {
   // Data has changed
};
dataSeries.dataChanged.subscribe(callback);

To unsubscribe from dataChanged, use the following code:

const dataSeries = new XyDataSeries(wasmContext);
dataSeries.dataChanged.unsubscribe(callback);

Readonly dataDistributionCalculator

dataDistributionCalculator: IDataDistributionCalculator

Gets the IDataDistributionCalculator instance for this DataSeries. Used when resampling data to determine the correct algorithm

dataSeriesName

dataSeriesName: string

Gets the DataSeries name. This is used in legend controls and tooltips to identify the series

Optional fifoCapacity

fifoCapacity: number

Gets the maximum size of the dataSeries in FIFO (First In First Out) mode. This can only be set in the constructor options. If set, the dataSeries supports only append, appendRange, update and clear. Any data that is appended once the dataSeries has reached fifoCapacity will cause the oldest data to be discarded. This is a much more efficient than appending and removing for achieving scrolling data. Spline series and Stacked series currently do not support fifo mode. To get the scrolling effect, you need to consider the behaviour of your X Axis. You can either Use a CategoryAxis Use a NumericAxis with increasing x values, and update the visibleRange (or use zoomExtents)

Optional fifoStartIndex

fifoStartIndex: number

Internal only - Get the starting offset when in fifo mode

Optional fifoSweeping

fifoSweeping: boolean

If true, data in fifo mode will not be "unwrapped" before drawing, giving ecg style sweeping mode. To get the sweeping effect, you need to consider the behaviour of your X Axis. You can either Use a CategoryAxis Use a NumericAxis and make your x values an offset from the first value, eg by doing x % fifoCapcity

Optional fifoSweepingGap

fifoSweepingGap: number

In fifo sweeping mode, the number of earliest points to skip to create a gap between the latest and earliest data

hasValues

hasValues: boolean

When true, the DataSeries has values, else it is empty

Readonly id

id: string

A unique Id for the IDataSeries

isEvenlySpaced

isEvenlySpaced: boolean

Gets or sets whether the X-values are evenly spaced or not. See remarks at IDataSeries.isEvenlySpaced for further information

remarks

The user must specify this flag (defaults to true) in order to choose the correct, and fastest algorithms for drawing, indexing and ranging. If you experience glitches or strange drawing, it may be because you have set data with uneven spacing in X but not set this flag.

isSorted

isSorted: boolean

Gets or sets whether the X-values are sorted ascending or not. See remarks at IDataSeries.isSorted for further information

remarks

The user must specify this flag (defaults to true) in order to choose the correct, and fastest algorithms for drawing, indexing and ranging. If you experience glitches or strange drawing, it may be because you have set unsorted data but not set this flag.

minXSpacing

minXSpacing: number

Readonly type

Gets the EDataSeriesType type of the DataSeries

xRange

xRange: NumberRange

Gets the range in the X-direction for this DataSeries

Methods

clear

  • clear(): void
  • Clear all values from the DataSeries

    Returns void

count

  • count(): number
  • Gets the count of data-points in the DataSeries

    Returns number

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

getIndicesRange

  • Gets the integer indices of the XValues array that are currently in the VisibleRange passed in, and an undefined range otherwise.

    Parameters

    • visibleRange: NumberRange

      The VisibleRange to get the indices range

    • Optional isCategoryData: boolean

      If True the renderable series uses CategoryAxis

    • Optional downSearchMode: ESearchMode

      Specifies the search mode used to look for the index of visibleRange.Min

    • Optional upSearchMode: ESearchMode

      Specifies the search mode used to look for the index of visibleRange.Max

    Returns NumberRange

    numberRange The indices to the X-Data that are currently in range.

getIsDeleted

  • getIsDeleted(): boolean
  • Returns true if this DataSeries has been deleted and native memory destroyed

    Returns boolean

getNativeIndexes

  • getNativeIndexes(): SCRTDoubleVector
  • Gets a native / WebAssembly Vector of Indexes in the DataSeries

    Returns SCRTDoubleVector

getNativeValue

  • getNativeValue(values: SCRTDoubleVector, index: number): number
  • Get the value from a native vector , potentially accounting for fifo sweeping.

    Parameters

    • values: SCRTDoubleVector
    • index: number

    Returns number

getNativeXValues

  • getNativeXValues(): SCRTDoubleVector
  • Gets a native / WebAssembly vector of X-values in the DataSeries

    Returns SCRTDoubleVector

getNativeYValues

  • getNativeYValues(): SCRTDoubleVector
  • Gets a native / WebAssembly vector of Y-values in the DataSeries

    Returns SCRTDoubleVector

getWindowedYRange

  • Gets the Y-range of the data within the specified X-Range: a 'windowed' Y-range used for zooming into series on the SciChartSurface

    Parameters

    Returns NumberRange

getXRange

toJSON

  • Convert the object to a definition that can be serialized to JSON, or used directly with the builder api

    Parameters

    • Optional excludeData: boolean

      if set true, data values will not be included in the json.

    Returns TDataSeriesDefinition

Generated using TypeDoc