MCPcopy Index your code
hub / github.com/apache/echarts / requireAxisStatistics

Function requireAxisStatistics

src/coord/axisStatistics.ts:468–495  ·  view source on GitHub ↗
(
    registers: EChartsExtensionInstallRegisters,
    client: AxisStatKeyedClient
)

Source from the content-addressed store, hash-verified

466 * See `axisSnippets.ts` for some commonly used clients.
467 */
468export 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
497let clientsForCheckingStatKey: HashMap<1, AxisStatKey>;
498if (__DEV__) {

Calls 3

makeClientLookupKeyFunction · 0.85
assertFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…