apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.36k stars 19.61k forks source link

[Bug] How to display details about objects which are behind the clicked/hovered object. #19882

Open ragava28 opened 5 months ago

ragava28 commented 5 months ago

Version

5.2.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=GYVwdgxgLglg9mABAcwKZlQJwIZVQEVQAcoALACjDgHcBKRAbwChFEAbVKRamMgE2JlEAXkQBtALoBuFomBxMicgDdsimCMQAGKYg0AeRAEYtp3RoDUok_WatWPfoNIA6IiADOFMVWoAaPQCtCVoZVgBfWUxOEEwkR1IBElIZSI4uPlxsTUkZdMRfTQxqRHxcVHIjAE4qgHYAqoCAZlCmfIQCbABPTQAmABZEACpEJoA2U2HjUx0mJkLRYtLy8gtfWhc0KAAVGABbCtb5RRU1PU0jc0RDAFYdPQsLW1kFgppEC0QOsq6w9k45ApUNgIKRdgdNGgMDg8IRkpQaK1WJkoNlRCjsC4IAgILhyMdgaDwahWpEmHASPAkKI7IgoHA4GxYEQAFziBjhCR-WRdACCAA8YB42WJZKxafYCtgDmyAORwoTkPa0WXcyWsKBdIioOWqNggVCysWISKsLmyfkCoUi40S-ya7Vy2AHVXG1heGhsqCYA3G02Ic2sZCYGB8G2Su3u0ieuk-1Bq9X01mIXo3BOSgBGcCg9L2bLu6fsHGAUDZVS0hdYIeQpFLiH6abdiGxYFRMDAABlsBnUGw2cBsGwPPGm1nMAJMAB1UNkNlGP2yQOIYch1DC8S2psOnWIWUeXE5rCu9WIDFsjGV5ddPZZvu76LQY_qjzX28AeWAwGHdbEsoAtHcACkqq7gBWjAUukovjejIAMowAAXjuYi9L0AQmBIC5mgmwbYEQpAwBA4b2JGiC9qgBytuuoonuKTaStucoPlAT60cupB4TupEnvyc4FvR6pdPmFYCZKPB8LOKamJeJ6kKgMA1nW_SmKJJoyfYHiahwbLceqwAwGwd6yl0vZsDQrFsV8RAgrwQnaC4jaWRp3pwAA1juxmmeZ6mSmw7aoNOEmkGyvSqeEPmIAhbJjBFCEcMovbRQJ4UCbpGpah5zEWSeXicTpqmsLxUkiU5rB2fxpXcDOwXTCVpVyQptZsspWhhRFmldNpjAFXIBlGdEfDZbRFI2ZqbJaA5EXui57lMagg1Tew_mBZJoVOSlTlRYgMWqXFqAJXeYzJU2mGSv6mHhDITB7F0ADCHGYFALgIOQsoQH5ECuSBoCQLACBKNZOB7B4zysAA9GD1ByfEqDNh9rlfEgABK82IAA4jg-GEV8GYAFaoNAATRiUfBwCgAJkLDAhtkOiDdnAIBcJTOP49A3AEaCdPRIgPYEWAfB6FwAD8sgQ0t7l01mjOICZhnvMGcAcyzBNcAAZMuB54IoHjSkQHAeC4iCyC2HiMqgLhmcg5CA9KIOpKEQA

Steps to Reproduce

Use sample provided .

On click/hover of red graphic object, how do we get the details about the objects which are behind it, like displaying details about red,yellow graphic objects & also scatter chart sample in tool tip .

Current Behavior

Tool tip params provides only top object details. is there way to access other object which user hovered on ?

In our situation , each graphic object represent a shadow(which has it own name & properties), which can over lap with other shadows, when user hovers on it , we have to display all shadows details with scatter series sample details .,

Expected Behavior

In tooltip params , can we get other objects, which are behind it.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

helgasoft commented 5 months ago

Consider using markArea inside series, instead of separate graphic - Demo 📌 please close issue if problem solved.

ragava28 commented 5 months ago

Thank you @helgasoft for you response. We are already using MarkArea & MarkeLine to represent a business functionality on the chart(like Markers) and Graphic object to represent different functionality which has drag & drop functionality attached to it.

So we can think of some thing like this . at series level we have data & Mark area , Mark Line , and top that we have graphics object.

when we get it into situation where everything is at once place like multiple markers & multiple graphics objects (as we have option to move them across ) , when this happens tooltip or click events are giving only top most object details, so how do we get the other objects which are behind it ,so that we can show details about them in tool tip.

updated sample Sample