(
registers: EChartsExtensionInstallRegisters,
client: AxisStatKeyedClient
)
| 466 | * See `axisSnippets.ts` for some commonly used clients. |
| 467 | */ |
| 468 | export function requireAxisStatistics( |
| 469 | registers: EChartsExtensionInstallRegisters, |
| 470 | client: AxisStatKeyedClient |
| 471 | ): void { |
| 472 | const clientKey = makeClientLookupKey(client.seriesType, client.baseAxis, client.coordSysType); |
| 473 | |
| 474 | if (__DEV__) { |
| 475 | assert(client.seriesType |
| 476 | && client.key |
| 477 | && !clientsForCheckingStatKey.get(client.key) |
| 478 | && !clientsForLookup.get(clientKey) |
| 479 | ); // More checking is performed in `axSerPairCheck`. |
| 480 | clientsForCheckingStatKey.set(client.key, 1); |
| 481 | } |
| 482 | |
| 483 | clientsForLookup.set(clientKey, client); |
| 484 | |
| 485 | callOnlyOnce(registers, function () { |
| 486 | registers.registerProcessor(registers.PRIORITY.PROCESSOR.AXIS_STATISTICS, { |
| 487 | // NOTE: Theoretically, `appendData` requires `dirtyOnOverallProgress: true` here to re-calculate them. |
| 488 | // But this OVERALL_STAGE_TASK is applied to all series (no `getTargetSeries` specified), |
| 489 | // `dirtyOnOverallProgress: true` can cause irrelevant series (e.g., series on geo) |
| 490 | // to be re-rendered when `appendData` is called, which cause `appendData` meaningless, |
| 491 | // thereby not setting `dirtyOnOverallProgress: true`. |
| 492 | overallReset: performAxisStatisticsOnOverallReset |
| 493 | }); |
| 494 | }); |
| 495 | } |
| 496 | |
| 497 | let clientsForCheckingStatKey: HashMap<1, AxisStatKey>; |
| 498 | if (__DEV__) { |
no test coverage detected
searching dependent graphs…