Options
All
  • Public
  • Public/Protected
  • All
Menu

Declares the column slots a renderable series consumes and how each maps onto a data-series column - the TS port of the C++ SCRTColumnBindings concept (see SCRTRenderableSeries2D.h / .cpp). Slots are declared once, at construction time, by the series (and its ancestors); bind / clearBinding then let callers retarget a bindable slot onto a named or indexed column.

resolve mirrors both the C++ SCRTColumnBindings::Resolve and the existing yArrayFilter logic in BaseRenderableSeries.getNativeYValues: an unknown slot name, an unbound slot, or a typo'd/out-of-range binding all resolve to undefined so a mistake never blanks the chart - the caller is expected to fall back to its own default column in that case.

Hierarchy

  • ColumnBindings

Index

Accessors

version

  • get version(): number
  • Monotonic version, bumped by bind / clearBinding (feeds resample-cache invalidation)

    Returns number

Methods

bind

  • bind(slotName: string, column: string | number): void
  • Map a slot to a data-series column, by column index or by column name.

    throws

    if the slot is not declared, or the slot is declared with bindable: false

    Parameters

    • slotName: string
    • column: string | number

    Returns void

clearBinding

  • clearBinding(slotName: string): void
  • Remove a slot's override, reverting it to its default (unbound) column. Unknown slots are a no-op.

    Parameters

    • slotName: string

    Returns void

declareSlot

  • declareSlot(slot: Omit<IColumnSlot, "boundColumn">): void
  • Declare a slot. Intended to be called only from series constructors (base then subclass, immediately after super(...)). Duplicate names (by IColumnSlot.name) are ignored - the first declaration wins.

    Parameters

    Returns void

getBoundColumn

  • getBoundColumn(slotName: string): string | number | undefined
  • The column currently bound to a slot, or undefined when unbound/unknown.

    Parameters

    • slotName: string

    Returns string | number | undefined

getColumnSchema

  • getColumnSchema(): ReadonlyArray<Readonly<IColumnSlot>>
  • The queryable schema - a defensive copy, safe for callers to inspect but not to mutate live state through.

    Returns ReadonlyArray<Readonly<IColumnSlot>>

resolve

  • resolve(slotName: string, dataSeries: BaseDataSeries): SCRTDoubleVector | undefined
  • Resolve a slot's column values against dataSeries.

    • No binding (or unknown slot / missing dataSeries) -> undefined (caller uses its own default path)
    • Numeric binding -> dataSeries.getNativeYValues(index)
    • String binding -> dataSeries.getYValuesByName(name, EDataSeriesValueType.Default), when dataSeries exposes getYValuesByName (only BaseDataSeries does - duck-checked)
    • Unknown column name / out-of-range index -> undefined, never throws

    Parameters

    Returns SCRTDoubleVector | undefined

Generated using TypeDoc