(
ecModel: GlobalModel,
axisStatKey: AxisStatKey,
cb: (axis: Axis) => void
)
| 293 | * by the given key. |
| 294 | */ |
| 295 | export function eachAxisOnKey( |
| 296 | ecModel: GlobalModel, |
| 297 | axisStatKey: AxisStatKey, |
| 298 | cb: (axis: Axis) => void |
| 299 | ): void { |
| 300 | if (__DEV__) { |
| 301 | assert(axisStatKey != null); |
| 302 | } |
| 303 | const keyed = ecModelCacheFullUpdateInner(getCachePerECFullUpdate(ecModel)).keyed; |
| 304 | const perKey = keyed && keyed.get(axisStatKey); |
| 305 | perKey && perKey.each(function (perKeyPerAxis) { |
| 306 | if (__DEV__) { |
| 307 | assert(perKeyPerAxis.sers.length > 0); // This is to avoid irrelevant axes to enter `cb`. |
| 308 | } |
| 309 | cb(perKeyPerAxis.axis); |
| 310 | }); |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * NOTICE: Available after `CoordinateSystem['create']` (not included). |
no test coverage detected
searching dependent graphs…