(
source: Source,
sysDims: CoordDimensionDefinitionLoose[],
dimsDef: DimensionDefinitionLoose[],
optDimCount?: number
)
| 372 | // on other dimensions besides coordSys needed. |
| 373 | // So, dims that is not used by system, should be shared in data store? |
| 374 | function getDimCount( |
| 375 | source: Source, |
| 376 | sysDims: CoordDimensionDefinitionLoose[], |
| 377 | dimsDef: DimensionDefinitionLoose[], |
| 378 | optDimCount?: number |
| 379 | ): number { |
| 380 | // Note that the result dimCount should not small than columns count |
| 381 | // of data, otherwise `dataDimNameMap` checking will be incorrect. |
| 382 | let dimCount = Math.max( |
| 383 | source.dimensionsDetectedCount || 1, |
| 384 | sysDims.length, |
| 385 | dimsDef.length, |
| 386 | optDimCount || 0 |
| 387 | ); |
| 388 | each(sysDims, function (sysDimItem) { |
| 389 | let sysDimItemDimsDef; |
| 390 | if (isObject(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) { |
| 391 | dimCount = Math.max(dimCount, sysDimItemDimsDef.length); |
| 392 | } |
| 393 | }); |
| 394 | return dimCount; |
| 395 | } |
| 396 | |
| 397 | function genCoordDimName( |
| 398 | name: DimensionName, |
no test coverage detected
searching dependent graphs…