archiewood commented on code in PR #21372:
URL: https://github.com/apache/echarts/pull/21372#discussion_r2543031710
##########
src/component/dataZoom/AxisProxy.ts:
##########
@@ -303,6 +304,10 @@ class AxisProxy {
return;
}
+ zrUtil.each(dataDims, function (dim, index) {
+ dataDims[index] = getStackedDimension(seriesData, dim);
Review Comment:
> This seems to be unexpected to me because this makes const dataDims =
seriesData.mapDimensionsAll(axisDim); almost useless.
- The `mapDimensionsAll(axisDim)` call is necessary to get all dimensions
that map to this axis.
- Then `getStackedDimension()` transforms each dimension to its stacked
result dimension _**only**_ if that dimension is stacked - otherwise it returns
the original dimension unchanged.
an alternative would be maybe to define dataDims like this, and then not
overwrite the elements later, I was just concerned this would be less clear
```js
const dataDims = zrUtil.map(
seriesData.mapDimensionsAll(axisDim),
function(dim) {
return getStackedDimension(seriesData, dim);
}
);
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]