Skip to content

Showing external tooltip on legend hover issue #9842

@peteruithoven

Description

@peteruithoven

Expected Behavior

When I use tooltip.setActiveElements on legend.onHover and I'm using an external tooltip, it should show the tooltip.

Current Behavior

The externalTooltip handler is called, which would render the tooltip, but then it's immediately called a second time, where the second time the tooltip.opacity is 0.

Steps to Reproduce

Example: https://codepen.io/peteruithoven/pen/qBXMBNx?editors=0010
Hover over legend items, no tooltip will appear.
(console.log will show external tooltip function calls)
Initial setActiveElements and regular pie chart hovering does show tooltip.

Context

We sometimes have charts with very low values, so we need an additional way to show the tooltip.

Environment

  • Chart.js version: 3.5.1
  • Browser name and version: Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions