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

[Bug] 折线图设置降采样sampling: 'lttb'时,选中非采样点,tooltip的formatter函数的params参数返回为空,tooltip也不会弹出 #19914

Open turnflowerdown opened 5 months ago

turnflowerdown commented 5 months ago

Version

5.5.0

Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/large-scale-area-chart-9hqlk9

Steps to Reproduce

使用官方示例:https://codesandbox.io/p/sandbox/large-scale-area-chart-9hqlk9

  1. 缩放缩小到能够显示所有数据
  2. 鼠标移入图表,发现显示了tooltip的标记线,但是没有显示tooltip的content
  3. 移动到部分数据上或放大,又可以显示content

Current Behavior

折线图设置降采样sampling: 'lttb'时,选中非采样点,tooltip的formatter函数的params参数返回为空,tooltip也不会弹出

Expected Behavior

希望选中非采样点时,也可以弹出tooltip的content

Environment

- OS: Windows
- Browser: Chrome 最新版本
- Framework: React

Any additional comments?

No response

echarts-bot[bot] commented 5 months ago

@turnflowerdown 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** [Bug] When the line chart is set to downsample: 'lttb', if the non-sampled point is selected, the params parameter of the formatter function of the tooltip will return empty, and the tooltip will not pop up