Skip to content
Discussion options

You must be logged in to vote

The most likely reason is: your charts are being created (or re-created on mobile ≤ 600px) without the correct options.plugins.tooltip config, so Chart.js falls back to the default gray tooltip and your externalTooltipHandler never runs.

Here’s a clean, “works in Chart.js v4” fix.


Fix (Chart.js 4.x): attach external under options.plugins.tooltip

1) Use ONE shared tooltip config and apply it to every chart config (desktop + mobile)

const tooltipOptions = {
  enabled: false,                  // disables the default gray tooltip
  position: 'nearest',
  external: externalTooltipHandler // your custom handler
};

function buildCommonOptions() {
  return {
    responsive: true,
    maintainAs…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jcduro

This comment was marked as off-topic.

Answer selected by jcduro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other General topics and discussions that don't fit into other categories, but are related to GitHub Question Ask and answer questions about GitHub features and usage
2 participants