Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected colorProperty

colorProperty: string

Protected colorValue

colorValue: number

dataLabels

dataLabels: TDataLabel[] = []

The text to draw, along with the sizes and positions. Usually generated, but can be updated before final drawing

Protected dataSeries

drawImmediate

drawImmediate: boolean = false

Draws immediately, set this True when using sub-surfaces for proper data label layering

getClipRect

getClipRect: ((renderPassData: RenderPassData) => Rect) | undefined

When set, this provider's labels are drawn immediately after generation (during the series draw), clipped to the returned rect (surface coordinates), instead of in the deferred global text pass. See IBaseDataLabelProviderOptions.getClipRect

Protected isEnabledProperty

isEnabledProperty: boolean = true

metaDataSelector

metaDataSelector: (metadata: IPointMetadata) => string

If this is set it will be used to get text values from metaData, rather than formatting y values. The selector will be called even if the metaData for an index is undefined.

Type declaration

Protected parentSeries

parentSeries: IRenderableSeries

The Parent RenderableSeries

Protected styleProperty

styleProperty: TDataLabelStyle

Protected textBounds

textBounds: TSRTextBounds

Reusable native text-bounds buffer, allocated once at attach time. Hoisted here so allocation never happens on the render path — first-time native allocation can grow the WASM heap and detach any Float64Array views captured earlier in the same frame (e.g. inside a DataLabelState).

Readonly type

type: EDataLabelProviderType = EDataLabelProviderType.Heatmap

Protected webAssemblyContext

webAssemblyContext: TSciChart

The SciChart 2D WebAssembly Context containing native methods and access to our WebGL2 Engine and WebAssembly numerical methods

Protected zValues

zValues: NumberArray[]

Accessors

color

  • get color(): string
  • set color(value: string): void
  • Gets or sets the color for data labels. Defaults to axis label color

    Returns string

  • Gets or sets the color for data labels. Defaults to axis label color

    Parameters

    • value: string

    Returns void

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(value: boolean): void
  • Flag to enable/disable dataLabel generation. Default true

    Returns boolean

  • Flag to enable/disable dataLabel generation. Default true

    Parameters

    • value: boolean

    Returns void

numericFormat

  • Gets or sets numeric format to use when formatting values to text. For a list of values, see ENumericFormat For more control, override getText

    Returns ENumericFormat

  • Gets or sets numeric format to use when formatting values to text. For a list of values, see ENumericFormat For more control, override getText

    Parameters

    Returns void

precision

  • get precision(): number
  • set precision(value: number): void
  • Gets or sets the precision to use when formatting values to text For more control, override getText

    Returns number

  • Gets or sets the precision to use when formatting values to text For more control, override getText

    Parameters

    • value: number

    Returns void

style

  • Gets or sets the text style used for data labels. The style must be set, with fontFamily and fontSize set, in order for text to be drawn.

    Returns TDataLabelStyle

  • Gets or sets the text style used for data labels. The style must be set, with fontFamily and fontSize set, in order for text to be drawn.

    Parameters

    Returns void

Protected useRotation

  • get useRotation(): boolean

Methods

delete

  • delete(): void
  • Returns void

draw

drawClipped

  • Draws this provider's labels immediately, clipped to the given rect (surface coordinates). Pre-flushes any pending font batches under the state they expect (identity transform + surface clip) so the clip cannot apply to text batched by others, then sets the label clip and force-ends the font so the clip applies to exactly this provider's labels, then restores the seriesViewRect transform + clip.

    Parameters

    Returns void

Protected drawLabels

generateDataLabels

getColor

  • getColor(xIndex: number, yIndex: number, text: string): number
  • Parameters

    • xIndex: number
    • yIndex: number
    • text: string

    Returns number

Protected getLineSpacing

  • getLineSpacing(): number

getPosition

  • getPosition(xIndex: number, yIndex: number, xVal: number, yVal: number, textSize: Size, cellWidth: number, cellHeight: number, renderPassData: RenderPassData): { position: Point; rotationAngle: number; rotationCenter: Point }
  • Parameters

    • xIndex: number
    • yIndex: number
    • xVal: number
    • yVal: number
    • textSize: Size
    • cellWidth: number
    • cellHeight: number
    • renderPassData: RenderPassData

    Returns { position: Point; rotationAngle: number; rotationCenter: Point }

    • position: Point
    • rotationAngle: number
    • rotationCenter: Point

getText

  • getText(xIndex: number, yIndex: number): string
  • Parameters

    • xIndex: number
    • yIndex: number

    Returns string

Protected invalidateParent

  • invalidateParent(): void

onAttach

onDetach

  • onDetach(): void
  • Returns void

resolveAutoColors

  • resolveAutoColors(index: number, maxSeries: number, theme: IThemeProvider): void

Protected resolveColumnType

  • Resolves the declared EColumnType of the data-series column whose values this provider is turning into text, or undefined when there is none. Supplies the formatting DEFAULT that an unset numericFormat/precision (or labelFormat/labelPrecision) falls back to — see DEFAULT_FORMAT_FOR_COLUMN_TYPE. An explicit setting always wins over it.

    getColumnType is optional-called as a CAPABILITY, matching how getTextAt is reached on this path: any DataSeries able to declare column types serves one, and anything else (a plain XyDataSeries, a third-party IDataSeries) simply falls through to the class default.

    Parameters

    • parentSeries: IRenderableSeries

      the renderable series the labels are being drawn for

    • Optional field: string | number

      the column the provider was explicitly pointed at (a name, or an index into valueNames), or undefined to use the series' own y selection

    Returns EColumnType | undefined

shouldGenerate

  • shouldGenerate(textSize: Size, cellWidth: number, cellHeight: number): boolean
  • Parameters

    • textSize: Size
    • cellWidth: number
    • cellHeight: number

    Returns boolean

shouldSkipLabel

  • shouldSkipLabel(xIndex: number, yIndex: number, label: TDataLabel, cellWidth: number, cellHeight: number): boolean
  • Parameters

    • xIndex: number
    • yIndex: number
    • label: TDataLabel
    • cellWidth: number
    • cellHeight: number

    Returns boolean

toJSON

updateStyle

  • Update the style. Only the properties passed will be updated

    Parameters

    Returns void

Generated using TypeDoc