Creates a new Figure instance from MAIDR data.
After construction, call applyLayout with the result of
resolveSubplotLayout() to set visual ordering and axes references.
The MAIDR data containing figure information and subplots
Protected ReadonlyobserversProtectedisProtectedisTrue while AbstractTrace.getStateAt computes state at a temporarily moved cursor. Enforces (structurally, not just by documentation) that state getters never notify observers.
ReadonlyidProtectedmovableReadonlysubplotsProtecteddimensionProtectedvaluesGets the currently active subplot based on row and column position
The active subplot
Gets the current state of the figure including active subplot
The complete figure state
ProtectedhighlightProtectedoutProtectedgetGets safe row and column indices to prevent accessing undefined values
Object with safe row and column indices
Registers an observer to receive state updates.
The observer to add
Removes an observer from receiving state updates.
The observer to remove
Notifies all registered observers with the current state.
Notifies observers that an out-of-bounds condition occurred.
Base implementation of navigation in HIGHER and LOWER modes of ROTOR, default is no-op Needs to be implemented in Line, Bar, Heatmap, Candlestick
Utility function to compare point values for rotor functionality
boolean value
Returns true if this trace supports compare (lower/higher value) navigation. Override to false for trace types that don't use compare modes (e.g., scatter, which is all we currently have).
Returns the display name for the default data navigation mode. Override to provide a trace-specific name (e.g., "ROW AND COLUMN NAVIGATION" for scatter).
Returns the rotor's compare-mode labels and boundary-message nouns. Override to rename the two compare units for a trace-specific semantic (e.g., the candlestick delta layer uses "above line" / "below line").
Moves the active point to the (x, y) pointer location and returns directional guidance toward the nearest data geometry.
Combines navigation and guidance into a single call so traces compute
findNearestPoint only once per pointer event. Default returns null
for non-trace contexts.
Screen-space x position of the pointer/finger
Screen-space y position of the pointer/finger
Guidance state, or null when unavailable
Applies pre-computed visual layout data to this figure and its subplots.
Must be called once after construction (and before the figure is used)
with the result of resolveSubplotLayout().
The pre-computed layout from the utility function.
Overrides navigation to conditionally invert vertical direction. When data row 0 is at the visual top, we invert UPWARD/DOWNWARD so that pressing Up arrow moves toward lower row indices (visual top).
Overrides extreme navigation with the same directional adjustment.
Overrides movability checks with the same directional adjustment, so the
check-then-move idiom (if (isMovable(d)) moveOnce(d)) stays consistent
with moveOnce/moveToExtreme on inverted layouts.
Cleans up all subplots and releases resources
Builds at-a-glance summaries of every subplot in the figure, ordered by visual position (top-left first). Returns an empty array for single-panel figures since there is nothing extra to surface.
Represents a figure containing one or more subplots