apache / echarts

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

[Bug] candlestick item changes color while dragging #16495

Open SanLeen opened 2 years ago

SanLeen commented 2 years ago

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

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

color_err_2

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

color_err_3

Current Behavior

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

color_err

Expected Behavior

Leftmost item color remains consistent during dragging.

Environment

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

Any additional comments?

Echarts Editor Code

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])
    }
  ]
};
Ovilia commented 2 years ago

This is may be a bug of dojo (when opening is the same as closing value) with candlestick.