Options
All
  • Public
  • Public/Protected
  • All
Menu

The base class for DataSeries in SciChart's 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

Implements

Index

Constructors

Protected constructor

  • Creates an instance of BaseDataSeries

    Parameters

    • webAssemblyContext: TSciChart

      the {@link TSciChart | SciChart WebAssembly Context} containing native methods and access to our underlying WebGL2 rendering engine

    • Optional options: IBaseDataSeriesOptions

      the IBaseDataSeriesOptions which can be passed to config the DataSeries at construct time

    Returns BaseDataSeries

Properties

Readonly dataChanged

dataChanged: EventHandler<void> = new EventHandler<void>()

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

Protected indexes

indexes: DoubleVector

Protected isDeleted

isDeleted: boolean

minXSpacing

minXSpacing: number = 0

Readonly Abstract type

Gets the EDataSeriesType type of the DataSeries

Protected webAssemblyContext

webAssemblyContext: TSciChart

The {@link TSciChart | SciChart WebAssembly Context} containing native methods and access to our WebGL2 Engine

Protected xValues

xValues: DoubleVector

Protected yValues

yValues: DoubleVector

Accessors

containsNaN

  • get containsNaN(): boolean
  • set containsNaN(containsNaN: boolean): void
  • Gets or sets whether the Y data contains NaN values. Set containsNaN = false for the performance optimization when the series has no NaNs

    inheritdoc

    Returns boolean

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

    inheritdoc

    Parameters

    • containsNaN: boolean

    Returns void

dataSeriesName

  • get dataSeriesName(): string
  • set dataSeriesName(dataSeriesName: string): void
  • Gets the DataSeries name. This is used in legend controls and tooltips to identify the series

    inheritdoc

    Returns string

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

    inheritdoc

    Parameters

    • dataSeriesName: string

    Returns void

hasValues

  • get hasValues(): boolean
  • When true, the DataSeries has values, else it is empty

    inheritdoc

    Returns boolean

isSorted

  • get isSorted(): boolean
  • set isSorted(isSorted: boolean): void
  • Gets or sets whether the X-values are sorted or not. See remarks at IDataSeries.isSorted for further information

    inheritdoc

    Returns boolean

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

    inheritdoc

    Parameters

    • isSorted: boolean

    Returns void

xRange

  • Gets the range in the X-direction for this DataSeries

    inheritdoc

    Returns NumberRange

Methods

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

getIsDeleted

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

    Returns boolean

getNativeIndexes

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

    Returns DoubleVector

getNativeXValues

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

    Returns DoubleVector

getNativeYValues

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

    Returns DoubleVector

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

    • xRange: NumberRange
    • getPositiveRange: boolean

      When true, return the positive part of the Y-range only

    • Default value isXCategoryAxis: boolean = false

      When true, treat the XAxis as a CategoryAxis - an axis type which measures by x-index not x-value

    Returns NumberRange

notifyDataChanged

  • notifyDataChanged(): void
  • Call to notify subscribers of dataChanged that the data has changed and SciChartSurface needs redrawing

    Returns void

Generated using TypeDoc