Skip to content

[BUG] Tooltip flickers when moving the mouse slightly over the same data point #91

@jacksonsfaria

Description

@jacksonsfaria

Describe the bug
When hovering over a chart using Crystalise Chart, the tooltip appears as expected. However, if the mouse moves even a single pixel while still over the same data point, the tooltip closes and immediately opens again.

This causes a visible flickering effect and makes the tooltip feel unstable.

Expected behavior
If the hovered data point has not changed, the tooltip should remain open and simply keep its current state. It should not close and reopen when the mouse moves slightly within the same data point area.

Suggested behavior:

Before closing and reopening the tooltip, the chart should check whether the hovered data point actually changed. If the tooltip content would be the same, it should keep the existing tooltip instead of recreating it.

This would prevent flickering and provide a smoother hover experience.

To Reproduce
Move mouse 1 pixel over chart to show the tooltip.

Code Example

Screenshots
https://github.com/user-attachments/assets/dcd6ef7c-a4d9-417c-8ceb-704990c60e48

Flutter Environment (please complete the following information):

  • Cristalyse Version: [1.17.5]
  • Flutter Version: [3.41.1]
  • Dart Version: [3.11]

Platform (please complete the following information):

  • OS: [Web, Windows]
  • Version: [Windows 11]
  • Device: [PC]

Dataset Information:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions