Options
All
  • Public
  • Public/Protected
  • All
Menu

XyyDataSeries is a DataSeries for holding X, Y1, Y2 data in SciChart's 2D JavaScript Charts

remarks

The XyyDataSeries is primarily used with our JavaScript Band Chart, which draws a High-Low fill between two lines, where the fill changes color depending on whether line Y2 > Y1

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

constructor

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 type

type: Xyy = EDataSeriesType.Xyy

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

y1AnimationValues

y1AnimationValues: DoubleVector

Y1 values animation vector

Protected y1Values

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

append

  • append(x: number, y: number, y1: number): void
  • Appends a single X, Y, Y1 point to the DataSeries

    remarks

    For best performance on drawing large datasets, use the appendRange method

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • x: number

      The X-value

    • y: number

      The Y1-value

    • y1: number

      The Y2-value

    Returns void

appendRange

  • appendRange(xValues: number[], yValues: number[], y1Values: number[]): void
  • Appends a range of X, Y, Y1 points to the DataSeries

    remarks

    This method is considerably higher performance than append which appends a single point

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • xValues: number[]

      The X-values

    • yValues: number[]

      The Y-values

    • y1Values: number[]

      The Y1-values

    Returns void

clear

  • clear(): void
  • Clears the entire DataSeries.

    remarks

    Note this does not free memory, WebAssembly/Native memory is released by calling delete, after which the DataSeries is no longer usable.

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    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

getIsDeleted

  • getIsDeleted(): boolean

getNativeIndexes

  • getNativeIndexes(): DoubleVector

getNativeXValues

  • getNativeXValues(): DoubleVector

getNativeY1Values

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

    Returns DoubleVector

getNativeYValues

  • getNativeYValues(): DoubleVector

getWindowedYRange

insert

  • insert(startIndex: number, x: number, y: number, y1: number): void
  • Inserts a single X,Y1,Y2 value at the start index

    remarks

    For best performance on drawing large datasets, use the insertRange method

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • startIndex: number

      the index to insert at

    • x: number

      the Xvalue

    • y: number

      the Y1Value

    • y1: number

      the Y2Value

    Returns void

insertRange

  • insertRange(startIndex: number, xValues: number[], yValues: number[], y1Values: number[]): void
  • Inserts a ragne of X,Y1,Y2 values at the startIndex

    remarks

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • startIndex: number

      the index to insert at

    • xValues: number[]

      the XValues

    • yValues: number[]

      the YValues

    • y1Values: number[]

      the Y1Values

    Returns void

notifyDataChanged

  • notifyDataChanged(): void

removeAt

  • removeAt(index: number): void
  • Removes a single X,Y1,Y2 value at the specified index

    remarks

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • index: number

      the index to remove at

    Returns void

removeRange

  • removeRange(startIndex: number, count: number): void
  • Removes a range of X,Y1,Y2 values at the specified index

    remarks

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • startIndex: number

      the start index to remove at

    • count: number

      the number of points to remove

    Returns void

update

  • update(index: number, y: number, y1: number): void
  • Updates a single Y, Y1-value by X-index

    remarks

    Any changes of the DataSeries will trigger a redraw on the parent SciChartSurface

    Parameters

    • index: number

      the index to update

    • y: number

      The new Y value

    • y1: number

      The new Y1 value

    Returns void

Generated using TypeDoc