Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Optional isRangeIndependant

isRangeIndependant: boolean

Set true if the paletting does not depend on the visible Range. This prevents the palette being recalculated if only the visible range changes.

Methods

applyPaletting

  • applyPaletting(palettingState: TPalettingState, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, indexes: SCRTDoubleVector, startIndex: number, count: number, otherValues?: Map<string, Float64Array>): void
  • Called once per render to populate the palette colours in bulk, giving direct access to the native colour vector for high-performance / stateful paletting.

    remarks

    IMPORTANT: colours written into palettingState.palettedColors must be in ABGR format (the native vertex-colour format), NOT the ARGB format returned by the per-point IStrokePaletteProvider.overrideStrokeArgb / IFillPaletteProvider.overrideFillArgb callbacks. The library does NOT convert these colours. Parse colours with parseColorToUIntAbgr("red") (or convert an existing ARGB uint with uintArgbColorToAbgr), both in utils.

    Parameters

    • palettingState: TPalettingState

      the paletting state. Write your colours into its palettedColors UIntVector.

    • xValues: SCRTDoubleVector

      the native x-values for the current render pass

    • yValues: SCRTDoubleVector

      the native y-values for the current render pass

    • indexes: SCRTDoubleVector

      the native data indexes for the current render pass

    • startIndex: number

      the index of the first visible point

    • count: number

      the number of points in the current render pass

    • Optional otherValues: Map<string, Float64Array>

      a map of valueName to Float64Array for fast access to other y-values

    Returns void

onAttached

  • Called when the PaletteProvider instance is attached to a RenderableSeries. Use this to be notified when attached and keep a reference to the parent series

    Parameters

    Returns void

onDetached

  • onDetached(): void

Optional shouldUpdatePalette

  • shouldUpdatePalette(): boolean
  • Called once before the per-vertex loop starts.

    Returns boolean

    true if paletting should be forced to run. If this exists and returns false, the existing paletting state is reused if possible. If this does NOT exist, the palette will be recalculated on every render. This default will change in v4. Use this to force the palette to be recalculated if some external parameter to it changes.

Optional toJSON

Generated using TypeDoc