echarts [Bug] When a bar type series, xAxis of type time display wrong dates

zhte4eai  于 3个月前  发布在  Echarts
关注(0)|答案(1)|浏览(70)

Version

4.9.0

https://tinyurl.com/yeyphcu2

Steps to Reproduce

  1. Create a chart with 2 series and an xAxis of type time
  2. The first series has data from time to time. From date range 15th of March to 20th of March. This series is a line type
  3. The second one has an empty array and is a bar type series

Current Behavior

The xAxis display wrong date range. In linked example, you can see label from 11/03 to 25/03 and it is not the valid dates.
Fun fact: if you switch the second series to a line type, the bug disappear and xAxis display valid label from dates with data.

Expected Behavior

I expect that xAxis display dates label that match the data of all series, even if the series is a bar type.

Environment

- OS: Windows 11
- Browser: Chrome 122.0.6261.129 
- Framework: Vue@2.6.14

Any additional comments?

We have spot the bug on version 4.9.0 but I linked a sandbox which use Echarts@5.5.0.

Did I miss something in Documentation ?

相关问题