apache / apache/echarts

[Bug] candlestick item changes color while dragging

Open
#16,495 1 comment 0 reactions 0 assignees View on GitHub
bug en topic: k/candlestick
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.3.0

### Link to Minimal Reproduction

_No response_

### Steps to Reproduce

1. A set of data with the same closing and opening prices and a downward trend.

![color_err_1](https://user-images.githubusercontent.com/22147095/153561582-071e8845-6e4e-44f8-ace0-702b52513d7f.gif)

2. Leftmost item's color changes from red to green when dragging to the right.

![color_err_2](https://user-images.githubusercontent.com/22147095/153562107-2c147d37-8f9c-4524-8f65-4099a98f0b1a.gif)

3. Drag it back and the leftmost item’s color changes from green to red.

![color_err_3](https://user-images.githubusercontent.com/22147095/153562229-b8cf49dc-55b4-497a-a87c-c302a5655f91.gif)

### Current Behavior

The color of the leftmost item changes between red and green while dragging.

![color_err](https://user-images.githubusercontent.com/22147095/153562663-3cb3788f-ce8c-498c-833f-98b5c3a26e69.gif)

### Expected Behavior

Leftmost item color remains consistent during dragging.

### Environment

```markdown
- OS: Windows 10 Pro 21H2
- Browser: Microsoft Edge 98.0.1108.43
- Framework: Angular@11.2.4
```

### Any additional comments?

#### Echarts Editor Code

```typescript
option = {
animation: false,
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
xAxis: {
data: new Array(30).fill('').map((o, i) => '2017/03/' + (i + 1))
},
yAxis: {},
dataZoom: [
{
type: 'inside',
xAxisIndex: [0, 1],
start: 50,
end: 100
}
],
series: [
{
type: 'candlestick',
data: [
2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 2, 3, 4, 5,
6, 5, 4, 3, 4, 5
]
.reverse()
.map((i) => [i * 10, i * 10, i * 10, i * 10])
}
]
};
```

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.