apache / apache/echarts

[Bug] type: 'line', using sampling = 'lttb'. None of the downmined points display the tooltip properly using showTip.

Open
#20,488 5 comments 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.5.1

### Link to Minimal Reproduction

https://codepen.io/gpcwhitecap/pen/abeQOyK

### Steps to Reproduce

Enter the index of a sampled point in the input box and click Show Tooltip. The sampled point is not displayed properly.

### Current Behavior

I plotted a rather complex big data line chart via echarts, and at the same time I took over the display of the tooltip manually (mousemove, calculate dataIndex).
However, I found that the tooltip doesn't display when the dataIndex is a point that has been down-mined.
For my needs, I just want the tooltip.formatter to be triggered properly, and I only need an index for the params passed by the formatter, because I'm completely taking over the content of the formatter (which is looked up by index).
This problem causes the tooltip to be incomplete even when multiple charts are linked.

The function I'm using is
chart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: 100
});

I've taken a closer look at the source code, and it seems that the dataByCoordSys of the sampled points cannot be calculated

How can I solve this problem? Or how to avoid it?

### Expected Behavior

showTip is able to show the downgraded tooltip instead of having to go through doomZoom.

### Environment

```markdown
- OS:
- Browser:
- Framework:
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.