You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/05/28 03:41:08 UTC
[GitHub] [echarts] 100pah opened a new issue #15050: The feature of "if category axis min/max set, the other axis can be filtered" broken
100pah opened a new issue #15050:
URL: https://github.com/apache/echarts/issues/15050
### Version
5.0.0
### Steps to reproduce
in test case <test/axis-filter-extent.html>
### 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.
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] 100pah edited a comment on issue #15050: The feature of "if category axis min/max set, the other axis can be filtered" broken
Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #15050:
URL: https://github.com/apache/echarts/issues/15050#issuecomment-850090703
## TODO
Probably:
1. import `defaultAxisExtentFromData.ts` again in `grid/installSimple`. (Change `defaultAxisExtentFromData.ts` to no side-effect firstly).
2. Make `OrdianlScale['setSortInfo']` called in coord create phase rather than in `Grid['update']`.
3. remove `scale.isInExtentRange` and implement it in another way.
4. Make `OrdianlScale['contain']` check `_ticksByOrdinalNumber`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] 100pah edited a comment on issue #15050: The feature of "if category axis min/max set, the other axis can be filtered" broken
Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #15050:
URL: https://github.com/apache/echarts/issues/15050#issuecomment-850090703
## TODO
Probably:
1. import `defaultAxisExtentFromData.ts` again in `grid/installSimple`. (Change `defaultAxisExtentFromData.ts` to no side-effect firstly).
2. Make `OrdianlScale['setSortInfo']` called in `new Scale` phase rather than in `Grid['update']`.
3. remove `scale.isInExtentRange` and implement it in another way.
4. Make `OrdianlScale['contain']` check `_ticksByOrdinalNumber`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] 100pah edited a comment on issue #15050: The feature of "if category axis min/max set, the other axis can be filtered" broken
Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #15050:
URL: https://github.com/apache/echarts/issues/15050#issuecomment-850090703
## TODO
Probably:
1. import `defaultAxisExtentFromData.ts` again in `grid/installSimple`. (Change `defaultAxisExtentFromData.ts` to no side-effect firstly).
2. Make `OrdianlScale['setSortInfo']` called in coord create phase (it is before processors performed) rather than in `Grid['update']` (`Grid['update']` is later than processors performed).
3. remove `scale.isInExtentRange` and implement it in another way.
4. Make `OrdianlScale['contain']` check `_ticksByOrdinalNumber`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] 100pah edited a comment on issue #15050: The feature of "if category axis min/max set, the other axis can be filtered" broken
Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #15050:
URL: https://github.com/apache/echarts/issues/15050#issuecomment-850090703
## TODO
Probably:
1. import `defaultAxisExtentFromData.ts` again in `grid/installSimple`. (Change `defaultAxisExtentFromData.ts` to no side-effect firstly).
2. Make `OrdianlScale['setSortInfo']` called in `new Scale` rather than in `Grid['update']`.
3. remove `scale.isInExtentRange` and implement it in another way.
4. Make `OrdianlScale['contain']` check `_ticksByOrdinalNumber`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
[GitHub] [echarts] 100pah commented on issue #15050: The feature of "if category axis min/max set, the other axis can be filtered" broken
Posted by GitBox <gi...@apache.org>.
100pah commented on issue #15050:
URL: https://github.com/apache/echarts/issues/15050#issuecomment-850090703
## TODO
Probably:
1. import `defaultAxisExtentFromData.ts` again in `grid/installSimple`. (Change `defaultAxisExtentFromData.ts` to no side-effect firstly).
2. remove `scale.isInExtentRange` and implement it in another way.
3. Make `OrdianlScale['contain']` check `_ticksByOrdinalNumber`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org