Skip to content

Stop bar chart tooltips from blinking when hovering the value label - #1334

Merged
gskjold merged 1 commit into
mainfrom
fix/tooltip-pointer-events
Dec 4, 2026
Merged

gskjold merged 1 commit into
mainfrom
fix/tooltip-pointer-events

Conversation

@gskjold

@gskjold gskjold commented Nov 26, 2026

Copy link
Copy Markdown
Member

Why

Reported in #1270 (v2.6.0-rc2, Chrome/Opera on Windows and Firefox on Linux): resting the pointer on the top part of a bar, where the value label sits, makes the tooltip blink on and off about once a second. It happens on every bar chart, including Future energy price.

The tooltip is placed 10 px above the hovered bar, but its arrow is a ::after box drawn with a 9 px border, 18 px tall, whose lower (transparent) half still takes pointer events. It reaches about 10 px into the top of the bar. Once the tooltip appears it is under the pointer, so the bar gets mouseleave, the tooltip is hidden after 500 ms, the pointer is over the bar again, mouseenter shows it after another 500 ms, and so on.

Change

pointer-events: none on .tooltip (inherited by the arrow). The tooltip only shows text, so nothing is lost. ui/dist/index.css rebuilt; index.js is unchanged.

Verification

Local Vite dev server proxied to a real ESP32-S2 device running v2.6.0. A headless Chrome script (puppeteer) moved the pointer onto the value label of the tallest bar in each chart and sampled whether a tooltip was present every 100 ms for 4 s (# = shown, . = not):

Before (the device's own v2.6.0 UI, and the dev server with the old pointer-events forced back):

Future energy price (NOK)    ....#####.....#####.....#####.....#####.

After:

Future energy price (NOK)    ....####################################

Same result for Voltage, Amperage, Tariff peaks, Energy use last 24 hours and last 31 days. Not tested on a touch device; tap goes through the same click handler on the bar, which this does not touch.

Refs #1270

🤖 Generated with Claude Code

The tooltip's arrow (a transparent 18 px ::after box) reached about 10 px
into the top of the hovered bar, where the value label sits. Once the
tooltip appeared it covered the pointer, the bar got mouseleave, the
tooltip was hidden 500 ms later, and the next mouseenter brought it back:
a blink about once a second. The tooltip is display only, so let pointer
events pass through it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

🔧 PR Build Artifacts

Version: 3518ada

All environments built successfully. Download the zip files:

Artifacts expire after 7 days. View workflow run

@gskjold gskjold added this to the v2.6.1 milestone Nov 26, 2026
@gskjold
gskjold merged commit 5425bd8 into main Dec 4, 2026
8 checks passed
@gskjold
gskjold deleted the fix/tooltip-pointer-events branch December 4, 2026 09:13
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.

1 participant