apache / apache/echarts

[Bug] Setting the minimum/maximum outside the range of data causes long rendering times

Open
#18,058 0 comments 0 reactions 0 assignees View on GitHub
bug en topic: axis-time
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.4.1

### Link to Minimal Reproduction

_No response_

### Steps to Reproduce

1. Use the basic bar example on the ECharts website:
https://echarts.apache.org/examples/en/editor.html?c=bar-simple
2. Use this chart option:
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'time',
// min: "2022-12" <----- Uncomment and run the chart
},
series: [
{
data: ["2022-11"],
type: 'bar'
}
]
};

### Current Behavior

The page hangs and it takes a long time to load. Anywhere between 15-25 seconds is what I am experiencing

### Expected Behavior

Setting the minimum/maximum outside the range of data on a value axis doesn't have the same loading time problem, so this would be the expected behaviour

### Environment

```markdown
- OS: Windows 10 Build 19045.2251 & Windows 10 Build 19044.2251
- Browser: Chrome 108.0.5359.99 & Opera GX 92.0.4561.71
- Framework: N/A
```

### Any additional comments?

Specifically setting the minimum greater than the maximum data point and the maximum less than the smallest data point will cause this bug to occur

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.