The feature of "if category axis min/max set, the other axis can be filtered" broken
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.0.0
### Steps to reproduce
in test case
### What is expected?
```js
option = {
xAxis: {
type: 'category',
max: 1
},
yAxis: {
},
series: {
type: 'bar',
data: [['a', 22], ['b', 52], ['c', 959]]
}
};
```

### What is actually happening?

### Reason
This feature is original introduced in #12832 for bar-race, which need only display the top n bars and the value axis extent only calculated b y the displayed bars.
But later it is broken by 03fee2184, where this change probably incorrect:
https://github.com/apache/echarts/pull/13045/files#diff-3f57e4d3fde67206138ca3250e9b16d1e80d23bd3c327782cb10cbd0b1354aa4L199
`scale.isInExtentRange` depends on `scale._extent`, but `scale._extent` is not set here, but set later in `Grid['update']` (`Grid['_updateScale']`).
And then in eca59fa189426bc8e362b0169c04f06a11636c9d , the import of the file `defaultAxisExtentFromData.ts` is missed, but since the feature is broken, this missing can not be found by visual test.
### PENDING
[`OrdianlScale['isInExtentRange']`](https://github.com/apache/echarts/blob/5.1.1/src/scale/Ordinal.ts#L274) seems need to be refactored, because:
1. It depends on `_ticksByOrdinalNumber`, which but it is initialized in (1) `Grid['update']` (too late) (2) dispatchAction
2. [`OrdianlScale['contain']`](https://github.com/apache/echarts/blob/5.1.1/src/scale/Ordinal.ts#L139) implements the similar feature but do not use that `_ticksByOrdinalNumber` converter, it's weird.
Contributor guide
Assessment
This issue has not been assessed yet.