Options
All
  • Public
  • Public/Protected
  • All
Menu

The base class for Heatmap-style 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 BaseHeatmapDataSeries to find out what Heatmap data-series are available. See UniformHeatmapRenderableSeries to see the class for rendering a 2D JavaScript Heatmap Chart.

Hierarchy

Implements

Index

Constructors

Protected constructor

Properties

arrayHeight

arrayHeight: number = 0

Gets the height of the 2-dimensional array of Z-Values where array is ranked [width][height]

arrayWidth

arrayWidth: number = 0

Gets the width of the 2-dimensional array of Z-Values where array is ranked [width][height]

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

Protected hasDataChangesProperty

hasDataChangesProperty: boolean = false

When true, the BaseHeatmapDataSeries has data changes and requires redrawing

Readonly id

id: string

A unique Id for the IDataSeries

minXSpacing

minXSpacing: number = 0
inheritdoc

Protected normalizedVector

normalizedVector: SCRTFloatVector

A normalized {@link FloatVector} is a native / WebAssembly vector (array) of Float32 values with normalized values ready for drawing in SciChart's WebGL2 Rendering Engine

Protected size

size: number

Gets the size of the heatmap where size = arrayWidth * arrayHeight

Abstract type

Gets the EDataSeriesType type of the DataSeries

Protected webAssemblyContext

webAssemblyContext: TSciChart

The SciChart WebAssembly Context containing native methods and access to our underlying WebGL2 rendering engine

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(value: 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

    • value: boolean

    Returns void

dataDistributionCalculator

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

hasDataChanges

  • get hasDataChanges(): boolean
  • Returns true if the Heatmap DataSeries has data changes. This flag is set to true when notifyDataChanged is called, and reset to false after

    Returns boolean

hasNaNs

  • get hasNaNs(): boolean
  • set hasNaNs(value: boolean): void
  • Gets/sets whether this Heatmap has NaN value, to display them as transparent tiles

    Returns boolean

  • Gets/sets whether this Heatmap has NaN value, to display them as transparent tiles

    Parameters

    • value: boolean

    Returns void

hasValues

  • get hasValues(): boolean
  • Gets whether this Heatmap has values to display

    Returns boolean

isEvenlySpaced

  • get isEvenlySpaced(): boolean
  • set isEvenlySpaced(value: 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

    • value: boolean

    Returns void

isSorted

  • get isSorted(): boolean
  • set isSorted(value: 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

    • value: boolean

    Returns void

xMax

  • get xMax(): number
  • Gets the maximum X-value for this heatmap, which controls where it is displayed on a cartesian chart

    Returns number

xMin

  • get xMin(): number
  • Gets the minimum X-value for this heatmap, which controls where it is displayed on a cartesian chart

    Returns number

xRange

  • Gets the XRange for this heatmap, which controls where it is displayed on a cartesian chart

    Returns NumberRange

yMax

  • get yMax(): number
  • Gets the maximum Y-value for this heatmap, which controls where it is displayed on a cartesian chart

    Returns number

yMin

  • get yMin(): number
  • Gets the minimum Y-value for this heatmap, which controls where it is displayed on a cartesian chart

    Returns number

yRange

  • Gets the YRange for this heatmap, which controls where it is displayed on a cartesian chart

    Returns NumberRange

zMax

  • get zMax(): number
  • Computes the maximum Z-value for this heatmap

    remarks

    Be aware for performance reasons, every call to zMax will result in a recalculation

    Returns number

zMin

  • get zMin(): number
  • Computes the minimum Z-value for this heatmap

    remarks

    Be aware for performance reasons, every call to zMin will result in a recalculation

    Returns number

zRange

  • Computes the ZRange for this heatmap, which controls where it is displayed on a cartesian chart

    remarks

    Be aware for performance reasons, every call to zRange will result in a recalculation

    Returns NumberRange

Methods

clear

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

    Returns void

count

  • count(): number
  • Gets the number of heatmap cells

    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

    • 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

getMetadataAt

  • Gets the metadata by Y and X indexes

    Parameters

    • yIndex: number

      The Y index

    • xIndex: number

      The X index

    Returns IPointMetadata

getMetadataHeight

  • getMetadataHeight(): number
  • Gets the metadata matrix height

    Returns number

getMetadataWidth

  • getMetadataWidth(): number
  • Gets the metadata matrix width

    Returns number

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

getNormalizedVector

  • getNormalizedVector(colorMap: IColorMapParams, fillValuesOutOfRange?: boolean): SCRTFloatVector
  • Returns a FloatVector with normalized values based on the color map passed in

    Parameters

    Returns SCRTFloatVector

Protected getOptions

  • Parameters

    • Default value excludeData: boolean = false

    Returns IBaseHeatmapSeriesOptions

getWindowedYRange

  • inheritdoc

    Parameters

    • xRange: NumberRange
    • getPositiveRange: boolean
    • isCategoryAxis: boolean

    Returns NumberRange

Abstract getXRange

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

    Returns NumberRange

Abstract getXValue

  • getXValue(xIndex: number): number
  • Gets the X-value at the specified index.

    Parameters

    • xIndex: number

    Returns number

Abstract getYRange

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

    Returns NumberRange

Abstract getYValue

  • getYValue(yIndex: number): number
  • Gets the Y-value at the specified index.

    Parameters

    • yIndex: number

    Returns number

Protected getZRange

  • Computes the range in the Z-direction for this DataSeries

    remarks

    Be aware for performance reasons, every call to getZRange will result in a recalculation

    Returns NumberRange

getZValue

  • getZValue(yIndex: number, xIndex: number): number
  • Gets the ZValue at the specific Y,X index where Y must be within 0-arrayHeight and X must be within 0-arrayWidth

    Parameters

    • yIndex: number

      the y-index from 0 to arrayHeight

    • xIndex: number

      the x-index from 0 to arrayWidth

    Returns number

getZValues

  • getZValues(): number[][]
  • Gets a readonly collection of Z-values which can be read in the format zValues[y][x] Note that changes or manipulation of the 2D array will not update the Heatmap. Set it back via setZValues() to see changes to the chart

    Returns number[][]

notifyDataChanged

  • notifyDataChanged(changeType: EDataChangeType, xIndex?: number, yIndex?: number, name?: string): void
  • Notify subscribers to dataChanged that data has changed. Also sets internal flags. This will trigger a redraw on a parent SciChartSurface

    Parameters

    • changeType: EDataChangeType
    • Optional xIndex: number
    • Optional yIndex: number
    • Optional name: string

    Returns void

recreateNormalizedVector

  • recreateNormalizedVector(zMin: number, zMax: number, fillValuesOutOfRange?: boolean): void
  • Recreates the normalized vector (internally used for drawing heatmap) according to zMin and zMax values

    Parameters

    • zMin: number
    • zMax: number
    • Optional fillValuesOutOfRange: boolean

    Returns void

Protected setMetadata

  • Parameters

    Returns void

Protected setMetadataAt

  • setMetadataAt(yIndex: number, xIndex: number, metadata: IPointMetadata): void
  • 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

setZValue

  • setZValue(yIndex: number, xIndex: number, zValue: number, metadata?: IPointMetadata): void
  • Sets the ZValue at the specific Y,X index where Y must be within 0-arrayHeight and X must be within 0-arrayWidth

    Parameters

    • yIndex: number

      the y-index from 0 to arrayHeight

    • xIndex: number

      the x-index from 0 to arrayWidth

    • zValue: number

      the new Z-value

    • Optional metadata: IPointMetadata

      The point metadata

    Returns void

setZValues

  • setZValues(zValues: number[][], metadata?: IPointMetadata[][]): void
  • Sets a 2D array of zValues. Input is in the format zValues[y][x] where Y is 0 to height and X is 0 to Width

    Parameters

    • zValues: number[][]
    • Optional metadata: IPointMetadata[][]

      The array of arrays of point metadata

    Returns void

toJSON

Protected validateIndexes

  • validateIndexes(yIndex: number, xIndex: number): void
  • Parameters

    • yIndex: number
    • xIndex: number

    Returns void

Generated using TypeDoc