question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Continue Showing Same Tooltip On Dynamic Graph (Until Mouse Moves)

See original GitHub issue

One-line summary [问题简述]

Is there a simple way to continue showing the same tooltip on a dynamic graph (until the mouse moves)?

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.1.0 (via vue-echarts 3.1.3)
  • Browser version [浏览器类型和版本]: Chrome 69.0.3497.100
  • OS Version [操作系统类型和版本]: OSX High Sierra (10.13.6)

Expected behaviour [期望结果]

I have a graph that adds one new data point to a series every second. I can highlight any of those points, and the tooltip shows up just fine:

screen shot 2018-10-17 at 5 14 29 pm

However, when the graph updates the data after the next second, the tooltip moves on to the next point (because that point is now highlighted).

This makes it difficult to read any tooltip data.

Is there an easy way to keep showing the first tooltip, preferably until the mouse moves (to signal that another tooltip should be shown)?

NOTE: I have tried using the alwaysShowContent option, and that works somewhat. However, the tooltip shows for the currently selected point, and then changes to show for the next point in the series. After that happens, the tooltip does stay on the screen.

ECharts option [ECharts配置项]

option = {
    tooltip: {
        trigger: 'axis'
    }
    ...
    xAxis: {
       type: 'category'  
   }
}

Other comments [其他信息]

A similar issues appears on the Dynamic Graph example on the official docs page: https://ecomfe.github.io/echarts-examples/public/editor.html?c=dynamic-data2

However, here, the tooltip usually disappears entirely (because no point is highlighted at all).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adamtLICORcommented, Oct 26, 2018

@Ovilia Yes, I actually ended up using tooltip.alwayShowContent.

However, one problem that I ran into is that tooltip.alwaysShowContent literally always shows the tooltip, even when the mouse cursor is no longer hovering over the graph.

Additionally, tooltip.alwaysShowContent appears to actively block the hideTip action from getting dispatched, so you can’t actually hide the tooltip in any way while tooltip.alwaysShowContent is true.

Fortunately, I was able to get the desired effect by binding a callback to the chart’s globalout event, which set tooltip.alwaysShowContent to false, and then waiting a tick before dispatching the hideTip action.

Hopefully this information helps someone else in a similar situation!

0reactions
github-actions[bot]commented, Aug 12, 2022

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Showing Same Tooltip On Dynamic Graph (Until Mouse ...
One-line summary [问题简述] Is there a simple way to continue showing the same tooltip on a dynamic graph (until the mouse moves)?
Read more >
Chart TOOLTIP on Mouse HOVER - An Entire Dashboard in ...
If you can't believe it... Watch the Intro (2 minutes) and YES It's TRUE ▻An Entire Dashboard in One Chart.In this tutorial I...
Read more >
Dynamic Tooltip in Unity! (Resizable, Follows Mouse, Edge ...
Let's build a Dynamic Tooltip that can resize itself to fit whatever text we give it. This is essential for any game that...
Read more >
[GitHub] adamtLICOR opened a new issue #9246: Continue ...
One-line summary [问题简述] Is there a simple way to continue showing the same tooltip on a dynamic graph (until the mouse moves)? ###...
Read more >
Position tooltip based on mouse position - chart.js
the tooltip pointer will always be over the chart bar/line in the position of the mouse pointer when hovering the data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found