echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Multiple tooltips with different trigger type

Open dileepyelleti opened this issue 6 years ago • 20 comments

What problem does this feature solve?

For my line chart I need to show two types of tooltips. One on hover on exact point(like with trigger item) and another on hovering any other place (like trigger axis). Below issue was raised for same but closed without proper response https://github.com/apache/incubator-echarts/issues/4905

What does the proposed API look like?

tooltip: [{
        trigger: 'axis',
        formatter: axisTooltipFormatter
      },{
        trigger: 'item',
        formatter: itemTooltipFormatter
      }]

Or

{
  tooltip: {
     trigger: 'axis',
     formatter: axisTooltipFormatter
  },
  series[{
     ...
     tooltip: {
        formatter: itemTooltipFormatter // item trigger
    }
  ]

dileepyelleti avatar Aug 27 '19 08:08 dileepyelleti

Hi! We've received your issue and please be patient to get responded. šŸŽ‰ The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected] .

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! šŸµ

echarts-bot[bot] avatar Aug 27 '19 08:08 echarts-bot[bot]

It is not currently supported.

yufeng04 avatar Aug 28 '19 16:08 yufeng04

Hi. Multiple-tooltip is a feature we wish to implement in v5.0, which is a long term requirement. You may need to wait for some time before you can use this feature.

Ovilia avatar Aug 29 '19 03:08 Ovilia

@Ovilia could you answer this question for me https://stackoverflow.com/questions/60001739/formatting-axis-value-in-tooltip-for-trigger-item

rahulcyadav avatar Jan 31 '20 10:01 rahulcyadav

I want to show the item's data when the trigger on bar.stack[i].item, and show total analysis when trigger the part between the bar height to chart height.

Currently, the tooltip.formatter function has 3 parameters,

But I can't identify the trigger is from the axis or item in the tooltip.formatter function.

Obviously, the axis and the item trigger should have different behavior in a series-bar chart.

Does this is not supported in Echarts' latest version? 问题

zl7261 avatar Jul 20 '20 02:07 zl7261

image

a simple 'split' option to split the tooltip for each individual series.. is very helpful when analyzing multiple line charts

anoosurf avatar Nov 14 '20 12:11 anoosurf

@anoosurf can you give code snippet how you splits option

Darshan-agent avatar Apr 19 '21 06:04 Darshan-agent

the above pic is from highcharts .. i was suggesting echarts should have an option like this for easy contextual tooltip

anoosurf avatar Apr 19 '21 06:04 anoosurf

@anoosurf oh okay my Bad tooltip item trigger won't trigger all the plots :(

Darshan-agent avatar Apr 19 '21 06:04 Darshan-agent

Guys any Idea about below issue image

Darshan-agent avatar Apr 19 '21 06:04 Darshan-agent

Why is this closed exactly?

image

a simple 'split' option to split the tooltip for each individual series.. is very helpful when analyzing multiple line charts

This would be a nice feature

DavidFucsko avatar Apr 22 '21 16:04 DavidFucsko

Hi. Multiple-tooltip is a feature we wish to implement in v5.0, which is a long term requirement. You may need to wait for some time before you can use this feature.

Hello @Ovilia, I see the version is now 5.2.2, has this been implemented? Or has the roadmap changed?

Joaveinz avatar Jan 24 '22 09:01 Joaveinz

Hi, we're looking for this feature in our team as well. Is there any update on it in v5?

ddx32 avatar Apr 11 '22 15:04 ddx32

hello @Ovilia , do you have any idea if this feature was applied ?

MarceloDiazz avatar Nov 04 '22 01:11 MarceloDiazz

I have a problem, this tooltip does not show all the values ​​and they are below the div image

MarceloDiazz avatar Nov 04 '22 02:11 MarceloDiazz

for some strange reason the style of the tooltip sends top with a negative number and it stays below the div image

MarceloDiazz avatar Nov 04 '22 02:11 MarceloDiazz

image

MarceloDiazz avatar Nov 04 '22 02:11 MarceloDiazz

If anyone knows how I can edit that div to prevent it from doing that, If anyone knows how I can edit that div to prevent it from doing that, try extraCssText:"top:0 !important" but it doesn't work

image

MarceloDiazz avatar Nov 04 '22 02:11 MarceloDiazz

You can try to toggle the trigger between axis/item on mouseover/out over the series, something like this:

https://echarts.apache.org/examples/en/editor.html?c=multiple-y-axis&code=CYQwLiCMAEC80G0C0AWAbAGmkgrABiyUgOgCYBmUrUnTaAdjXq0nNqxVKukrtLxJoUWcuQC6AbgBQoCKTiJukAHR1yy8iI0iszMtSwl1w6CbSSZ4EOQUJl92SFIWpAWwCWAOwAiV-fAB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rRACS5p3OF1F1nY-QQJANMgSybIck1IFGaUbateAHWigCatYI4ou3Pcw07AgBti8kwYVVaVVxiz34GZZ-02YGvlPgZAmeK7gs3lKhvi9AkC-VLuJ-PLuaK-y7hciNuZqxr5RtdrXV69aVj-8bsDPI45Bm-nFtiNAhNivqlM2xeUiIgMriJopwT82Ayj0hEYquCdb17hULYvKxFTuAzGeUWeWCwZOm50v8ETFPz35SttvI13XDfKG9YBrjSE8RA-kfK7HzIaiK4qQaUrjlWecqPdAEmeFKbKlMoOV1C3bfjB3ZwVL39NSgRYqFMiAxuFrvXcojdm6t3bqUE6CFXif37n7C2Q95TQFHp4ce9Iloz1cHPZii9gGN1XuvJyW9Tw72jirR8B9OqtkimfTS_9eTX1viaB-lIn7gNfpA8YYBYEMx_n_FEuDl5gJfm_LuWAe50zgYPQOw9kFjychg8os954YSAcvAhG9m7b1ZFHGOmUBRCkPq2Y-p8qYX3Jowu-LC2EiMge_cakjeGQF_kiFEgCl4gKbpEdhHcuHdx4fAo23IYBIJQWgye08lFYJUT0NRniNFEO0UrMhe9EqGKoRKWitDzEMPpEw--j9n4QKgQEwOLjK4JCAA&lang=ts

rapomon avatar May 28 '24 07:05 rapomon

@rapomon This is a really good alternative. It allows me to configure different item formatters according to the series, and to keep the default tooltip for axis (just adding { replaceMerge: 'tooltip' } in mouseout setOption).

Thanks !

LiiKaz avatar Jun 21 '24 11:06 LiiKaz