Skip to content

[Bug] Tooltip showing wrong value off chart #19253

@Bekaxp

Description

@Bekaxp

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-gradient&code=MYewdgzgLgBAJgQygmBeGBtAUDTByAJgAYSBaIgNnIFY8AaGARkYoF06d9izLyL6mBAJztOGQiSJ9yAdgGMAzNVG5x3KbyIAOAVrYdVEnlSJCBMhSq6TpjIruUHrx0s3OWnam70YEBFLSsvF0UBIQIgow0qRgAWeQUiSPVbWgYCWMcxKNt-BkURTxyfOXzGLMMUnx0yxmTvGLMGRMLsqqpiAWJ9NobSAkYEmXqXAj98gkCi9v6FBxHo_viGIViF6QI0mBk66b6CPKZKdd4CUpgtNb3RmpghD17RpouK50XE9xOZckGGLQfKt5vkRxoJXsENMC5vkiMNrpDyMsLhF4bIaAJYldHgjKOYUdi0bD5MdUbDyLc7HCCWTTP4eoCeN87GFdtSmb87viGQjfPJFF9XNCjlTuWi4glWaKyeU-ZK3mLDhQsVKmecKK0Va5blopmzXM8ZCL5WTOn8AcbvgNZQKxgJqEaIWiCELqODipakRQklhWABuLBYEAABygAEtwGgYABvThhqAAGwApgAuaOcXBJgBmUFTeGAibAUETACd6OmYEWAB45mB4ADixYQcFDBdgCHj4AA5hWABaJmAATxgCEroYgeE4AF8nFAQCB42Gg6mY7hcFBi6HO52S7mR2OJ7hp5xEMgIImayvVxAQABXYv51MnhAAOgAtgggwAKT8YE-JhgAG7tjeiasAAlGgAB8MCflG8BIP-MBAfGIEwJOYFgU4uDNq-BYQOGkCpuIf4CHgyEgXgrBTk4lYAIKjhAy7llAA5BimtZhrhZarjAr6hmAuZVIwPwHmhTgDvRY7LkeuBnhuiaMZg5aXjxLFsbm8b8Ym3E8TAEA9iAADuADKA6vgARvOqaZu2Z5YauOF4QRinEQhpHkdpVE8ZOnBUZOvpAA

Steps to Reproduce

Use the attached minimal reproduction link or click here.

  1. Go with the mouse over the chart, you will see the tooltip with proper information for the hovered date (e.g. on 2000-06-07 the date value is 135). Thats expected and works nicely.
  2. Now move the mouse over to the left where there are no data points anymore. You will notice that the tooltip, no matter of the position off chart will always show the data of the first entry point of the chart (e.g. 2000-06-05 with the date value of 116).

Current Behavior

Following the steps above to reproduce the issue I can see that the tooltip when I have the cursor of the mouse off chart is always showing the first data point of the chart.

Here is also a video of the issue:

echarts-issue.mp4

Expected Behavior

I would expect that the tooltip is shown with the correct information only when I am hovering the chart where we have proper data points and that the tooltip disappears when is off chart. It would be also acceptable if the tooltip would still be shown but with information about the data at that hovered point (e.g. no data or something).

Environment

- OS: macOS 14
- Browser: Chrome Version 117.0.5938.92

Any additional comments?

  • Maybe this behaviour is intentional by the library by default?
  • Is there any option that we can use to achieve what is described above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnot-a-bugstaleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions