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<IDataChangeArgs> = new EventHandler<IDataChangeArgs>()

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 = new DataDistributionCalculator()

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

dataIds

dataIds: Record<number | string, number[]>

If set, these will be included in the serialised definition, so that it can be used with sharedData

Readonly id

id: string

A unique Id for the IDataSeries

Protected indexes

indexes: SCRTDoubleVector

Protected isDeleted

isDeleted: boolean

minXSpacing

minXSpacing: number = 0

Readonly Abstract type

Gets the EDataSeriesType type of the DataSeries

Readonly webAssemblyContext

webAssemblyContext: TSciChart

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

xFinalAnimationValues

xFinalAnimationValues: SCRTDoubleVector

X vector with final animation values

xInitialAnimationValues

xInitialAnimationValues: SCRTDoubleVector

X vector with initial animation values

Protected xValues

xValues: SCRTDoubleVector

yFinalAnimationValues

yFinalAnimationValues: SCRTDoubleVector

Y vector with final animation values

yInitialAnimationValues

yInitialAnimationValues: SCRTDoubleVector

Y vector with initial animation values

Protected yValues

yValues: SCRTDoubleVector

Accessors

changeCount

  • get changeCount(): number
  • Gets the change count for this data series. Allows to indentify when data series was changed

    inheritdoc

    Returns number

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

isEvenlySpaced

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

    inheritdoc

    Returns boolean

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

    inheritdoc

    Parameters

    • isSorted: boolean

    Returns void

isSorted

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

    inheritdoc

    Returns boolean

  • Gets or sets whether the X-values are sorted ascending 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

Protected appendMetadata

  • Parameters

    Returns void

Protected appendMetadataRange

  • appendMetadataRange(metadata: IPointMetadata[], length: number): void
  • Parameters

    Returns void

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

    • xRange: NumberRange

      The VisibleRange to get the indices range

    • Default value isCategoryData: boolean = false

      If True the renderable series uses CategoryAxis

    • Default value downSearchMode: ESearchMode = ESearchMode.RoundDown

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

    • Default value upSearchMode: ESearchMode = ESearchMode.RoundUp

      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

getMetadataAt

  • Gets the metadata by index

    Parameters

    • index: number

      The X index

    Returns IPointMetadata

getMetadataLength

  • getMetadataLength(): number
  • Gets the metadata array length

    Returns number

getNativeIndexes

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

    Returns SCRTDoubleVector

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

getXRange

Protected getXValues

  • Parameters

    Returns SCRTDoubleVector

hasMetadataGenerator

  • hasMetadataGenerator(): boolean
  • Check if the series has an existing metadaGenerator

    Returns boolean

Protected insertMetadata

  • Parameters

    Returns void

Protected insertMetadataRange

  • insertMetadataRange(startIndex: number, metadata: IPointMetadata[]): void
  • Parameters

    Returns void

notifyDataChanged

  • notifyDataChanged(changeType: EDataChangeType, index: number, count: number, name?: string): void
  • Call to notify subscribers of dataChanged that the data has changed and SciChartSurface needs redrawing

    Parameters

    • changeType: EDataChangeType
    • index: number
    • count: number
    • Optional name: string

    Returns void

Protected removeMetadataAt

  • removeMetadataAt(index: number): void
  • Parameters

    • index: number

    Returns void

Protected removeMetadataRange

  • removeMetadataRange(startIndex: number, count: number): void
  • Parameters

    • startIndex: number
    • count: number

    Returns void

setFinalAnimationVectors

  • Sets final values for the data animation

    Parameters

    Returns void

setInitialAnimationVectors

  • Sets initial values for the data animation

    Parameters

    Returns void

Protected setMetadata

  • Parameters

    Returns void

Protected setMetadataAt

  • Parameters

    Returns void

setMetadataGenerator

  • Sets a function that will be used to generate metadata for values when they are appended/inserted, if no explicit metadata is supplied.

    Parameters

    Returns void

toJSON

  • toJSON(excludeData?: boolean): any
  • Convert the object to a definition that can be serialized to JSON, or used directly with the builder api

    Parameters

    • Default value excludeData: boolean = false

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

    Returns any

updateAnimationProperties

  • updateAnimationProperties(progress: number, animation: SeriesAnimation): void
  • Updates the BaseDataSeries values for the animation

    Parameters

    • progress: number

      The animation progress from 0 to 1

    • animation: SeriesAnimation

      The animation

    Returns void

validateAnimationVectors

  • validateAnimationVectors(): void
  • Validates the length of the animation vectors

    Returns void

Protected validateIndex

  • validateIndex(index: number, message?: string): void
  • Parameters

    • index: number
    • Optional message: string

    Returns void

Generated using TypeDoc