(ecModel)
| 22960 | // (2) Only register once when import repeatly. |
| 22961 | // Should be executed after series filtered and before stack calculation. |
| 22962 | var dataStack = function (ecModel) { |
| 22963 | var stackInfoMap = createHashMap(); |
| 22964 | ecModel.eachSeries(function (seriesModel) { |
| 22965 | var stack = seriesModel.get('stack'); |
| 22966 | // Compatibal: when `stack` is set as '', do not stack. |
| 22967 | if (stack) { |
| 22968 | var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []); |
| 22969 | var data = seriesModel.getData(); |
| 22970 | |
| 22971 | var stackInfo = { |
| 22972 | // Used for calculate axis extent automatically. |
| 22973 | stackResultDimension: data.getCalculationInfo('stackResultDimension'), |
| 22974 | stackedOverDimension: data.getCalculationInfo('stackedOverDimension'), |
| 22975 | stackedDimension: data.getCalculationInfo('stackedDimension'), |
| 22976 | stackedByDimension: data.getCalculationInfo('stackedByDimension'), |
| 22977 | isStackedByIndex: data.getCalculationInfo('isStackedByIndex'), |
| 22978 | data: data, |
| 22979 | seriesModel: seriesModel |
| 22980 | }; |
| 22981 | |
| 22982 | // If stacked on axis that do not support data stack. |
| 22983 | if (!stackInfo.stackedDimension |
| 22984 | || !(stackInfo.isStackedByIndex || stackInfo.stackedByDimension) |
| 22985 | ) { |
| 22986 | return; |
| 22987 | } |
| 22988 | |
| 22989 | stackInfoList.length && data.setCalculationInfo( |
| 22990 | 'stackedOnSeries', stackInfoList[stackInfoList.length - 1].seriesModel |
| 22991 | ); |
| 22992 | |
| 22993 | stackInfoList.push(stackInfo); |
| 22994 | } |
| 22995 | }); |
| 22996 | |
| 22997 | stackInfoMap.each(calculateStack); |
| 22998 | }; |
| 22999 | |
| 23000 | function calculateStack(stackInfoList) { |
| 23001 | each$1(stackInfoList, function (targetStackInfo, idxInStack) { |
nothing calls this directly
no test coverage detected