Gets the unique identifier for the trace
The trace ID
ReadonlytraceThe trace's chart type, exposed without computing the full state.
ReadonlylayerHow the layer names itself in the chart description's layer tabs — the
producer's name when there is one, and the chart-type label otherwise.
Exposed here for the same reason Trace.traceType is: the tab strip
names every layer of a subplot, including the ones the reader has not
visited, and building each one's full state to read a label would compute
an audio, braille, text and highlight snapshot per layer per keypress.
ReadonlylevelWhich level of the figure this element is, for the same reason
Trace.traceType exists: state.type answers it too, but only
after building the whole audio/braille/text/highlight snapshot.
Runs the given moves with this trace's observers muted, so a relocation
the reader did not ask for does not announce itself. See
AbstractPlot.runSilently.
Gets the current X value from the trace
The current X value or null if not available
Moves the trace to the position that matches the given X value
The X value to move to
True if the position was found and set, false otherwise
OptionalgetGet the current Y value from the trace. Optional method implemented by traces that support Y value preservation during layer switching.
The current Y value or null if not available
OptionalmoveMove to a specific X value and find the closest position with the given Y value. Optional method implemented by traces that support preserving both X and Y values during layer switching.
The X value to move to
The Y value to find the closest matching position for
true if the move was successful, false otherwise
Notify observers that the trace is out of bounds
Resets the trace to initial entry state
Computes the trace state at an arbitrary position without moving the cursor or notifying observers (used by monitor mode).
The row of the position to compute state for
The column of the position to compute state for
The trace state at the requested position
Notifies all observers with a specific state
The trace state to send to observers
Get all highlight SVG elements for this trace Used by HighlightService for high contrast mode
Array of all SVG elements, or empty array if none
OptionalgetThe elements whose geometry is the trace as the chart drew it, when that differs from the highlight elements.
Optional, and empty rather than absent when a trace has nothing extra to
offer, so a caller can fall back to the highlight elements in one check.
Implemented by traces whose highlight markers stand in for a shape rather
than being it -- a line whose per-point circles maidr synthesised from the
rendered <path>, where the path is the geometry and the circles are only
the vertices on it.
The drawn elements, or an empty array when there are none
Moves to the nearest point at (x, y) and returns directional guidance
toward the nearest data geometry in a single call. Combining the two
operations avoids running findNearestPoint twice per pointer event.
For ViolinKdeTrace, coordinates map to (violin index, y-value within KDE curve); for ViolinBoxTrace, to (section index, violin index) for vertical orientation, or the inverse for horizontal.
Screen-space x position in viewport pixels
Screen-space y position in viewport pixels
Guidance state, or null when unavailable for this plot level
OptionalgetGets extrema targets for navigation. Optional method implemented by traces that support extrema navigation.
Array of extrema targets
OptionalnavigateNavigate to a specific extrema target. Optional method implemented by traces that support extrema navigation.
The extrema target to navigate to
Interface representing a trace with navigation and observation capabilities