Skip to content

Declare null hoveredItem signal for highlightedItem only lines - #969

Open
Hashim1999164 wants to merge 2 commits into
adobe:mainfrom
Hashim1999164:fix/line-highlighted-item-hovered-signal
Open

Hashim1999164 wants to merge 2 commits into
adobe:mainfrom
Hashim1999164:fix/line-highlighted-item-hovered-signal

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Oct 2, 2026 •

Copy link
Copy Markdown

Summary

Fixes #958

When a chart sets highlightedItem on a Line with no hover UI (no ChartTooltip, ChartPopover, onClick, etc.), getInteractiveMarkName still treats the line as the interactive mark target. Opacity rules and the hover animation hoveredMatch expression then reference line0_hoveredItem, but addSignals returned early for non interactive lines so that signal was never declared. Vega threw Unrecognized signal name: "line0_hoveredItem".

This declares a null ${name}_hoveredItem placeholder in that case so the encodings resolve. There are still no mouse handlers because there is no hover UI to drive them. Controlled highlighting continues to work through controlledHighlightedItem / highlighted data.

Test plan

  • yarn test:quiet packages/vega-spec-builder-s2/src/line/lineSpecBuilder.test.ts
  • New unit coverage for highlightedItem only via addSignals and via full addLine (animations on and off)

Hashim1999164 and others added 2 commits October 3, 2026 02:05
When highlightedItem makes a Line the interactive mark target but the
line has no hover UI, encodings still reference line0_hoveredItem.
Declare a null placeholder so Vega does not throw Unrecognized signal.
@Hashim1999164

Copy link
Copy Markdown
Author

added the missing changeset for the vega-spec-builder-s2 patch.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

S2 Line: highlightedItem on a non-interactive line throws "Unrecognized signal name"

1 participant