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

    Class Subplot

    Interface for plot traces that support keyboard navigation and movement.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    observers: Observer<SubplotState>[]
    isWarning: boolean
    movable: Movable
    traces: Trace[][]
    traceTypes: string[]

    Accessors

    • get isInitialEntry(): boolean

      Returns boolean

    • set isInitialEntry(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get isOutOfBounds(): boolean

      Returns boolean

    • set isOutOfBounds(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get row(): number

      Returns number

    • set row(value: number): void

      Parameters

      • value: number

      Returns void

    • get col(): number

      Returns number

    • set col(value: number): void

      Parameters

      • value: number

      Returns void

    • get axesElement(): SVGElement | null

      Returns the pre-resolved parent <g id="axes_*"> element for this subplot. This is set externally via setAxesElement during layout resolution and does not perform any DOM queries.

      Returns SVGElement | null

      The axes SVGElement, or null if not resolved.

    Methods

    • Gets safe row and column indices to prevent accessing undefined values

      Returns { row: number; col: number }

      Object with safe row and column indices

    • Base implementation of navigation in HIGHER and LOWER modes of ROTOR, default is no-op Needs to be implemented in Line, Bar, Heatmap, Candlestick

      Parameters

      • _direction: "left" | "right" | "up" | "down"
      • _type: "lower" | "higher"

      Returns boolean

    • Parameters

      • a: number

        Utility function to compare point values for rotor functionality

      • b: number
      • type: "lower" | "higher"

      Returns boolean

      boolean value

    • Moves up in rotor mode, optionally filtering by lower or higher values.

      Parameters

      • Optional_mode: "lower" | "higher"

        Optional mode for filtering (lower or higher)

      Returns boolean

      Error always - subclasses must override this method

    • Moves down in rotor mode, optionally filtering by lower or higher values.

      Parameters

      • Optional_mode: "lower" | "higher"

        Optional mode for filtering (lower or higher)

      Returns boolean

      Error always - subclasses must override this method

    • Moves left in rotor mode, optionally filtering by lower or higher values.

      Parameters

      • Optional_mode: "lower" | "higher"

        Optional mode for filtering (lower or higher)

      Returns boolean

      Error always - subclasses must override this method

    • Moves right in rotor mode, optionally filtering by lower or higher values.

      Parameters

      • Optional_mode: "lower" | "higher"

        Optional mode for filtering (lower or higher)

      Returns boolean

      Error always - subclasses must override this method

    • Gets the number of traces in the subplot

      Returns number

      The size (number of traces)

    • Override moveOnce to avoid "initial entry" no-op behavior for layer navigation.

      For multi-layer subplots, the MovableGrid is used to step between layers (traces). We don't want the first PageUp/PageDown to be eaten by handleInitialEntry; instead, it should actually switch layers.

      Parameters

      Returns boolean

    • Moves the element to the specified (x, y) point.

      This base implementation is intentionally left empty. Subclasses should override this method to provide specific logic for moving to a point, such as updating highlight values or managing selection boxes.

      Parameters

      • _x: number

        The x-coordinate to move to.

      • _y: number

        The y-coordinate to move to.

      Returns void

    • Gets the subplot state with figure position context

      Parameters

      • _figureRow: number

        The row position in the figure

      • _figureCol: number

        The column position in the figure

      Returns SubplotState

      The subplot state

    • Returns the subplot's own SVG highlight element (resolved from subplot.selector). Used by the layout utility to locate the parent axes group.

      Returns SVGElement | null

      The SVG element, or null if the subplot has no selector.

    • Returns the CSS selector string from the first layer of this subplot. Used as a fallback by the layout utility when getHighlightElement() is null.

      Returns string | null

      The selector string, or null if unavailable.

    • Sets the pre-resolved axes element for this subplot. Called by Figure.applyLayout during initialization.

      Parameters

      • element: SVGElement | null

        The axes SVGElement to store.

      Returns void