apache / echarts

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

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

Open aquettier opened 6 months ago

aquettier commented 6 months ago

Version

4.9.0

Link to Minimal Reproduction

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 ?

aquettier commented 5 months ago

Hello,

Any updates on this bug ?