apache / apache/echarts

[Bug] Serie disappears when swiping tooltip on x-axis

Open
#20,869 1 comment 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.6.0

### Link to Minimal Reproduction

n/a

### Steps to Reproduce

I cannot provide proper steps to reproduction as the bug not constant: sometimes it does work, sometimes it does not. The bug occurs on Safari mobile (iOS 18.3.2).

It was working fine until we customised the xAxis tooltip. Also, when debugging from the developer console > network in Google Chrome, I surprisingly found a `blob://xxx` call to get the chart. This I've never seen before. What would generate such request ?

Tooltip config:

```typescript
tooltip: {
trigger: 'axis',
showContent: false,
axisPointer: {
type: 'cross',
},
}
```

xAxis axisPointer value:

```typescript
axisPointer: {
z: 209,
label: {
color: '#fff',
backgroundColor: '#222',
padding: [6, 10],
formatter: ({ value, seriesData }) => {
let data = seriesData[0].value;
data = data ? yAxisDigits(`${data}`, yAxisFormatter) : '—';

return `{data|${data}}\n{value|${value}}`;
},
rich: {
data: {
width: 100,
align: 'center',
fontSize: 14,
fontFamily: 'HelveticaNeue-Medium',
padding: [0, 0, 4, 0],
},
value: {
align: 'center',
},
},
},
}
```

Series default options:

```typescript
series: {
type: 'line',
silent: true,
symbol: 'none',
lineStyle: {
width: 2,
},
connectNulls: true,
animationEasing: 'quadraticInOut',
z: 1,
}
```

### Current Behavior

When swiping over the chart to view tooltip, some of the points from the line chart disappear. Also, there is a `markLine` in the line series that is not affected, it's only the `data`

Before swiping from left to right:
![Image](https://github.com/user-attachments/assets/1d5bcbe9-afbd-4165-8e20-2e65b082643e)

After swiping from left to right:
![Image](https://github.com/user-attachments/assets/ad9e4e69-5757-429c-914b-ff2e1b4ad859)

### Expected Behavior

The points from data series should not be removed.

### Environment

```markdown
- OS: iOS 18.3.2
- Browser: Safari Mobile
- Framework: Angular / Typescript
```

### 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.