(seriesModel: SeriesModel)
| 127 | } |
| 128 | |
| 129 | export function findAxisModels(seriesModel: SeriesModel): { |
| 130 | xAxisModel: CartesianAxisModel; |
| 131 | yAxisModel: CartesianAxisModel; |
| 132 | } { |
| 133 | const axisModelMap = { |
| 134 | xAxisModel: null, |
| 135 | yAxisModel: null |
| 136 | } as ReturnType<typeof findAxisModels>; |
| 137 | zrUtil.each(axisModelMap, function (v, key) { |
| 138 | const axisType = key.replace(/Model$/, ''); |
| 139 | const axisModel = seriesModel.getReferringComponents( |
| 140 | axisType, SINGLE_REFERRING |
| 141 | ).models[0] as CartesianAxisModel; |
| 142 | |
| 143 | if (__DEV__) { |
| 144 | if (!axisModel) { |
| 145 | throw new Error(axisType + ' "' + zrUtil.retrieve3( |
| 146 | seriesModel.get(axisType + 'Index' as any), |
| 147 | seriesModel.get(axisType + 'Id' as any), |
| 148 | 0 |
| 149 | ) + '" not found'); |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | axisModelMap[key] = axisModel; |
| 154 | }); |
| 155 | |
| 156 | return axisModelMap; |
| 157 | } |
| 158 | |
| 159 | export function createCartesianAxisViewCommonPartBuilder( |
| 160 | gridRect: LayoutRect, |
no test coverage detected
searching dependent graphs…