Options
All
  • Public
  • Public/Protected
  • All
Menu

A Default Palette provider is applied to the BaseRenderableSeries.paletteProvider property in the constructor however all its functions such as DefaultPaletteProvider.overrideFillArgb, DefaultPaletteProvider.overrideStrokeArgb etc... are set to undefined. This allows a user to do quick one-line paletteproviders in vanilla Javascript like this:

const series = new FastLineRenderableSeries(wasmContext);
series.paletteProvider.overrideFillArgb = (xValue, yValue, index) => {
    return yValue > 0 ? parseColorToUIntArgb("white") : undefined;
}

Hierarchy

  • DefaultPaletteProvider

Implements

Index

Properties

fillPaletteMode

fillPaletteMode: EFillPaletteMode = EFillPaletteMode.GRADIENT

Protected parentSeries

parentSeries: IRenderableSeries

strokePaletteMode

strokePaletteMode: EStrokePaletteMode = EStrokePaletteMode.GRADIENT

Accessors

isRangeIndependant

  • get 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.

    inheritdoc

    Returns boolean

Methods

onAttached

onDetached

  • onDetached(): void

overrideFillArgb

  • overrideFillArgb(xValue: number, yValue: number, index: number, opacity?: number, metadata?: IPointMetadata): number
  • Called by SciChart and may be used to override the color of filled polygon in various chart types.

    remarks

    WARNING: CALLED PER-VERTEX, MAY RESULT IN PERFORMANCE DEGREDATION IF COMPLEX CODE EXECUTED HERE

    Parameters

    • xValue: number

      the current XValue

    • yValue: number

      the current YValue

    • index: number

      the current index to the data

    • Optional opacity: number

      the current opacity

    • Optional metadata: IPointMetadata

      the point metadata

    Returns number

    an ARGB color code, e.g. 0xFFFF0000 would be red, or 'undefined' for default colouring

overridePointMarkerArgb

  • Called by SciChart and may be used to override the color of fill/stroke on pointmarkers WARNING: CALLED PER-VERTEX, MAY RESULT IN PERFORMANCE DEGREDATION IF COMPLEX CODE EXECUTED HERE

    Parameters

    • xValue: number

      the current XValue

    • yValue: number

      the current YValue

    • index: number

      the current index to the data

    • Optional opacity: number

      the current opacity

    • Optional metadata: IPointMetadata

      the point metadata

    Returns TPointMarkerArgb

    TPointMarkerArgb type with ARGB stroke & fill color codes, e.g. 0xFFFF0000 would be red, or 'undefined' for default colouring

overrideStrokeArgb

  • overrideStrokeArgb(xValue: number, yValue: number, index: number, opacity?: number, metadata?: IPointMetadata): number
  • Called by SciChart and may be used to override the color of a line segment or stroke outline in various chart types.

    remarks

    WARNING: CALLED PER-VERTEX, MAY RESULT IN PERFORMANCE DEGREDATION IF COMPLEX CODE EXECUTED HERE

    Parameters

    • xValue: number

      the current XValue

    • yValue: number

      the current YValue

    • index: number

      the current index to the data

    • Optional opacity: number

      the current opacity

    • Optional metadata: IPointMetadata

      the point metadata

    Returns number

    an ARGB color code, e.g. 0xFFFF0000 would be red, or 'undefined' for default colouring

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.

toJSON

Static createEmpty

Generated using TypeDoc