Creates a new HighlightService instance.
The settings service used to retrieve highlight color preferences
Disposes of the service by removing all active highlights. Should be called when the service is no longer needed to prevent memory leaks.
Observer update method called when observed state changes. Routes to appropriate handler based on state type.
The updated state object (Settings, SubplotState, TraceState, or FigureState)
Manually highlights a single SVG element. Removes any existing highlight on the element before applying a new one.
The SVG element to highlight
Removes the highlight from a single SVG element. Safely handles cases where the element has no active highlight.
The SVG element to remove highlight from
Clears all active highlights from both trace elements and subplots. Use this method to reset the visual state of the visualization.
Service responsible for managing visual highlighting of SVG elements in MAIDR visualizations.
The HighlightService provides visual feedback by creating highlight overlays on chart elements when users navigate through data points. It supports both trace-level highlighting (individual data points) and subplot-level highlighting (for multi-plot scenarios).
Implements
Implements
Example