MAIDR Documentation - v3.72.1
    Preparing search index...

    Interface for objects that can be disposed to clean up resources or remove event listeners.

    Implements

    Index

    Constructors

    Properties

    id: string
    selectorList: string[] = []

    Accessors

    • get instructionContext(): Plot

      The plot element whose state drives the initial instruction text.

      Returns Plot

    • get isMultiPanel(): boolean

      Returns whether this figure has multiple subplots (facets/multi-panel).

      Returns boolean

    • get figureTitle(): string

      Returns the figure-level title (the top-level plot title), or the unavailable placeholder when the figure has no state. Use isAuthoredTitle to distinguish an authored title from the model's default substitutions.

      The empty-state branch returns DEFAULT_SUBPLOT_TITLE (the generic "unavailable" sentinel) rather than DEFAULT_FIGURE_TITLE because there is no figure at all in that case; "MAIDR Plot" would be misleading. Both sentinels are rejected by isAuthoredTitle, so callers see the same "not authored" outcome regardless.

      Returns string

    • get figureSubtitle(): string

      Returns the figure-level subtitle, or the unavailable placeholder when the figure has no state. Use isAuthoredSubtitle to distinguish an authored subtitle from the model's default substitution.

      Returns string

    • get figureCaption(): string

      Returns the figure-level caption, or the unavailable placeholder when the figure has no state. Use isAuthoredCaption to distinguish an authored caption from the model's default substitution.

      Returns string

    Methods

    • Replaces the underlying figure with a rebuilt model (live data update), preserving the user's navigation position when the figure shape allows.

      The old figure is disposed before createFigure runs so that stale highlight clones are removed from the DOM before the new model queries its SVG selectors.

      Positions are restored silently (no observer notifications) so a data update never announces or sonifies by itself; monitor mode handles user-facing feedback separately.

      Parameters

      • createFigure: () => Figure

        Factory that builds the replacement figure

      • options: ReplaceFigureOptions = {}

        Optional position adjustments (e.g. sliding-window shift)

      Returns Figure

      The newly created figure

    • Enable or disable rotor navigation for the current context.

      Parameters

      • enable: boolean

        true to enable rotor mode, false to disable

      Returns void

    • Return whether rotor navigation is currently enabled.

      Returns boolean

      boolean

    • Returns true when the given title came from the MAIDR JSON, i.e. it is not a placeholder default substituted by the Figure or Trace models when the JSON omits title. Encapsulates the model's internal default constants so callers (commands, services) can avoid importing them.

      Empty / whitespace-only strings are also treated as unauthored, since announcing a bare label like "Title is " is not useful.

      Known limitation: a title authored as the exact placeholder string (e.g. "MAIDR Plot" or "unavailable") will be filtered out. The sentinel defaults are deliberately uncommon strings to minimize collision risk.

      Parameters

      • title: string

        The title string to check.

      Returns boolean

    • Returns true when the given subtitle came from the MAIDR JSON, i.e. it is not the placeholder default the Figure model substitutes when the JSON omits subtitle. Same empty-string and collision caveats apply as isAuthoredTitle.

      Currently DEFAULT_SUBTITLE and DEFAULT_CAPTION are both 'unavailable', so this method is functionally identical to isAuthoredCaption; they are kept separate so the two can diverge independently without touching callers.

      Parameters

      • subtitle: string

        The subtitle string to check.

      Returns boolean

    • Returns true when the given caption came from the MAIDR JSON, i.e. it is not the placeholder default the Figure model substitutes when the JSON omits caption. Same empty-string and collision caveats apply as isAuthoredTitle; same independence rationale applies as isAuthoredSubtitle.

      Parameters

      • caption: string

        The caption string to check.

      Returns boolean

    • Parameters

      • row: number
      • col: number

      Returns void

    • Moves to the nearest point at (x, y) and returns directional guidance toward the nearest data geometry in a single call.

      Parameters

      • x: number

        Screen-space x position

      • y: number

        Screen-space y position

      Returns PointerGuidanceState | null

      Guidance state, or null when unavailable for current scope

    • Replaces the active trace at the top of the plot context with another trace, leaving the rest of the stack (and its depth) untouched. Used by the candlestick delta feature to activate its virtual layer and to restore the real layer on exit.

      Parameters

      • trace: Trace

        The trace to make active

      Returns Trace | null

      The trace that was active before the swap, or null when the current context is not at trace level (nothing is swapped then)

    • Returns the traces of the subplot the user is currently in, flattened in layer order. Used to discover sibling layers (e.g., reference lines for the candlestick delta feature).

      Returns Trace[]

    • Enters grid cell mode to navigate points within the current cell. Only works when the active trace supports grid navigation and is in grid mode.

      Returns boolean

      true if successfully entered cell mode, false if no points in cell

    • Exits grid cell mode and returns to grid navigation.

      Returns void

    • Moves to the previous point within the current grid cell.

      Returns void

    • Moves to the next point within the current grid cell.

      Returns void

    • Parameters

      • includeClickPrompt: boolean

      Returns string