apache / echarts

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

折线图使用lttb优化后,dispatchAction:showTip如果dataIndex是在降点采样的点显示不出来 #19450

Open pengxAlone opened 10 months ago

pengxAlone commented 10 months ago

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=line-simple&code=G4QwTgBA9gDgLgSygOwNwFgBQWK7wGwFM4IEIBeCABg0zwOIgBMQ4QKIBtAXVvtwDuACwREIACjIAeCAEYqCqgEoIAbxz9cLNgDoYAVwDOQ8ZwQAaUhACkchdyV9NpANQun9AL5YN9WIhQOdTpnOCgofEQYAC41X1CwBABzJMIwWIAiEAAPBEMM83jNOESUtIB5ZEyAWygjQlrgQgKivE9CkM1sgEFcw1jVdtbcAE9evIGhzv5DNIRCfq5hvGDnfm0QWI2Otfo4EZhCTPwEZGad3dxDEGqYE-Qk47g4ACMW6bXjKAEAZRHql4RWIAMxA-FmF0uhn-gPwPwQAC8jnZIbtDLUoHAhLESvpCKjNFM1twCRBPLRWv4kMgIAAyWkQaojADCQnAcB0szg5Xg1PEVJQjh8HwgRBIhgAksgmIRshwaK0xcwpTK5ZQFdgRUzWeydChxBkvgIACoIGAFCDA_TIADGARp4hg4BuhhUq2ckulso4TrALs5cwWKtlHnWwbVEF9_o24dDuE8Qs1miYUBt-mqhGQHJATCYAFEmlmADJ5OCZtIGgDWhBGKYEyAtVtt9okhELcDdyyV1ZZUBlHDbmY5PeZfcIcbwCGBEhHY4olAAzAB2Tsi-hMcMAWk3E_X4Y4AFlWEIdNUcuIqJYN17som1p4IIRwYRSNPxLP--RFwBOVeXJVnhG2psmAHKpNyvL6koAaJAsnBUNwOgbDoRAPFiu54NeqpuBhWj7pQR5YqepziIBV7hnezjeGujIsiBHJMHkTpwDaQjdHafLums-yHJkRqmuapL0LMsGeqqsRibKQmYawIDhls4bSQmE7KUAA

Steps to Reproduce

折线图,数据很多,使用了sampling:lttb,鼠标移入图表中,显示toolTip,点击图表

Current Behavior

然后想通过键盘的左右键查看上一个或者下一个点,目前会出现很多点不会显示tooltip,按很多下才会显示

Expected Behavior

理论上要么显示所有的点,要么跳过降点采样的点显示。

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

echarts-bot[bot] commented 10 months ago

@pengxAlone It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED
**TITLE** After the line chart is optimized by lttb, dispatchAction:showTip will not be displayed if the dataIndex is at the point sampled at the drop point **BODY** ### Version 5.4.3 ### Link to Minimal Reproduction https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=G4QwTgBA9gDgLgSygOwNwFgBQWK7wGwFM4IEIBeCABg0zwOIgBMQ4QKIBtAXVvtwDuACwREIACjIAeCAEYqCqgEoIAbxz9cLNgDoYAVwDOQ8ZwQAa UhACkchdyV9NpANQun9AL5YN9WIhQOdTpnOCgofEQYAC41X1CwBABzJMIwWIAiEAAPBEMM83jNOESUtIB5ZEyAWygjQlrgQgKivE9CkM1sgEFcw1jVdtbcAE9evIGhzv5DNIRCfq5hvGDnfm0QWI2Otfo4EZ hCTPwEZGad3dxDEGqYE-Qk47g4ACMW6bXjKAEAZRHql4RWIAMxA-FmF0uhn-gPwPwQAC8jnZIbtDLUoHAhLESvpCKjNFM1twCRBPLRWv4kMgIAAyWkQaojADCQnAcB0szg5Xg1PEVJQjh8HwgRBIhgAksg mIRshwaK0xcwpTK5ZQFdgRUzWeydChxBkvgIACoIGAFCDA_TIADGARp4hg4BuhhUq2ckulso4TrALs5cwWKtlHnWwbVEF9_o24dDuE8Qs1miYUBt-mqhGQHJATCYAFEmlmADJ5OCZtIGgDWhBGKYEyAtVtt9okhEL cDdyyV1ZZUBlHDbmY5PeZfcIcbwCGBEhHY4olAAzAB2Tsi-hMcMAWk3E_X4Y4AFlWEIdNUcuIqJYN17som1p4IIRwYRSNPxLP--RFwBOVeXJVnhG2psmAHKpNyvL6koAaJAsnBUNwOgbDoRAPFiu54NeqpuBhW j7pQR5YqepziIBV7hnezjeGujIsiBHJMHkTpwDaQjdHafLums-yHJkRqmuapL0LMsGeqqsRibKQmYawIDhls4bSQmE7KUAA ### Steps to Reproduce Line chart, a lot of data, using sampling:lttb, move the mouse into the chart, toolTip will be displayed, click on the chart ### Current Behavior Then I want to use the left and right keys of the keyboard to view the previous or next point. Currently, there will be many points without the tooltip being displayed. It will be displayed after pressing many times. ### Expected Behavior Theoretically, either all points should be displayed, or the downsampled points should be skipped. ### Environment ```markdown - OS: -Browser: - Framework: ``` ### Any additional comments? _No response_
helgasoft commented 10 months ago

maybe what you need is a dataZoom, then all points become accessible/visible - Demo Code