apache / apache/echarts

Bar chart with time axis doesn't use correct "min" and "max" axis options.

Open
#13,548 20 comments 4 reactions 1 assignee Claimed by @Ovilia View on GitHub
bug en topic: timeline
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version
4.9.0

### Steps to reproduce
Put the code bellow into Echarts exemple page like https://echarts.apache.org/examples/en/editor.html?c=line-simple

```js
option = {
yAxis: [
{
type: "value"
},
{
gridIndex: 1,
type: value
}
],
xAxis: [
{
min: 1572883414563,
max: 1604505814563,
type: "time"
},
{
min: 1572883414563,
max: 1604505814563,
gridIndex: 1,
type: "time"
}
],
series: [
{
type: "line"
},
{
data: [[1575068400000,89938],[1577746800000,467048]],
xAxisIndex: 1,
type: "bar",
yAxisIndex: 1
}
],
grid:[{bottom: "54%"},{top: "54%"}],
dataZoom: [
{
realtime: true,
xAxisIndex: [0,1]
},
{
realtime: true,
xAxisIndex: [0,1],
type: "inside"
}
]
}
```

### What is expected?
Min for the two xAxis should be 11-04-2019 (1572883414563 value in option) and Max for the two xAxis should be 11-04-2020 (1604505814563 value in option).

### What is actually happening?
Ok for the first xAxis, but not the second. Second axis has 10-22-2019 for Min and 11-18-2020 for Max.

---
If you set the second series to be type: "line", the problem does not occur. So it may be a problem with bar series...

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.