Images not showing inside Chart.js tooltips (externalTooltipHandler) #183838
-
Select Topic AreaQuestion BodyIssue abierto en GitHub Description Steps to reproduce Expected behaviour Current code Environment Suspected cause Labels Repository Demo |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The most likely reason is: your charts are being created (or re-created on mobile ≤ 600px) without the correct Here’s a clean, “works in Chart.js v4” fix. Fix (Chart.js 4.x): attach
|
Beta Was this translation helpful? Give feedback.
The most likely reason is: your charts are being created (or re-created on mobile ≤ 600px) without the correct
options.plugins.tooltipconfig, so Chart.js falls back to the default gray tooltip and yourexternalTooltipHandlernever runs.Here’s a clean, “works in Chart.js v4” fix.
Fix (Chart.js 4.x): attach
externalunderoptions.plugins.tooltip1) Use ONE shared tooltip config and apply it to every chart config (desktop + mobile)