Skip to content

Incorrect hover for barchart #7764

Description

@mzduke

Expected Behavior

When I hover over a bar, the appropriate bar has a triggered hover state.

Current Behavior

In specific circumstances, an incorrect bar highlighted as a hovered.
barchart-hover-bug

Codepen

Steps to Reproduce

  1. Hover on the first bar for a second
  2. Without delay hover over the second bar and also without delay on the third (you can hover back and forth between bars 2 and 3).
  3. If you will do a delay over the second bar, the issue won't happen. Also in you don't do a delay over the first bar the issue won't happen.

Context

The issue started to appear in 2.9.0 (also relevant for 2.9.3) but everything was working fine in 2.8.0.
Quick research showed that issue introduced by this PR: #6527 (example in this PR contains the mentioned issue).

Environment

  • Chart.js version: 2.9.x

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions