@@ -126,10 +126,12 @@ export type AxisStatKeyedClient = {
126126
127127/**
128128 * Within each individual axis, different groups of relevant series and statistics are
129- * designated by `AxisStatKey`. In most case `seriesType` is used as `AxisStatKey`.
129+ * designated by a `AxisStatKey`.
130+ * In most case `seriesType` is used as `AxisStatKey`.
130131 */
131132export type AxisStatKey = string & { _ : 'AxisStatKey' } ; // Nominal to avoid misusing.
132- type ClientQueryKey = string & { _ : 'ClientQueryKey' } ; // Nominal to avoid misusing; internal usage.
133+
134+ type ClientLookupKey = string & { _ : 'ClientLookupKey' } ; // Nominal to avoid misusing; internal usage.
133135
134136export type AxisStatMetrics = {
135137
@@ -468,7 +470,7 @@ function performStatisticsForRecord(
468470// For performance optimization.
469471const tmpValueBuffer = tryEnsureTypedArray (
470472 { ctor : Float64ArrayCtor } ,
471- 50 // arbitrary. May be expanded if needed .
473+ 50 // An arbitrary initial capability .
472474) ;
473475
474476/**
@@ -525,8 +527,8 @@ export function associateSeriesWithAxis(
525527 const seriesType = seriesModel . subType ;
526528 const isBaseAxis = seriesModel . getBaseAxis ( ) === axis ;
527529
528- const client = clientsByQueryKey . get ( makeClientQueryKey ( seriesType , isBaseAxis , coordSysType ) )
529- || clientsByQueryKey . get ( makeClientQueryKey ( seriesType , isBaseAxis , null ) ) ;
530+ const client = clientsForLookup . get ( makeClientLookupKey ( seriesType , isBaseAxis , coordSysType ) )
531+ || clientsForLookup . get ( makeClientLookupKey ( seriesType , isBaseAxis , null ) ) ;
530532 if ( ! client ) {
531533 return ;
532534 }
@@ -554,16 +556,16 @@ export function associateSeriesWithAxis(
554556 * NOTE: Currently, the scenario is simple enough to look up clients by hash map.
555557 * Otherwise, a caller-provided `filter` may be an alternative if more complex requirements arise.
556558 */
557- function makeClientQueryKey (
559+ function makeClientLookupKey (
558560 seriesType : ComponentSubType ,
559561 isBaseAxis : boolean | NullUndefined ,
560562 coordSysType : CoordinateSystem [ 'type' ] | NullUndefined
561- ) : ClientQueryKey {
563+ ) : ClientLookupKey {
562564 return (
563565 seriesType
564566 + AXIS_STAT_KEY_DELIMITER + retrieve2 ( isBaseAxis , true )
565567 + AXIS_STAT_KEY_DELIMITER + ( coordSysType || '' )
566- ) as ClientQueryKey ;
568+ ) as ClientLookupKey ;
567569}
568570
569571/**
@@ -575,18 +577,18 @@ export function requireAxisStatistics(
575577 registers : EChartsExtensionInstallRegisters ,
576578 client : AxisStatKeyedClient
577579) : void {
578- const queryKey = makeClientQueryKey ( client . seriesType , client . baseAxis , client . coordSysType ) ;
580+ const clientKey = makeClientLookupKey ( client . seriesType , client . baseAxis , client . coordSysType ) ;
579581
580582 if ( __DEV__ ) {
581583 assert ( client . seriesType
582584 && client . key
583- && ! clientsCheckStatKey . get ( client . key )
584- && ! clientsByQueryKey . get ( queryKey )
585+ && ! clientsForCheckingStatKey . get ( client . key )
586+ && ! clientsForLookup . get ( clientKey )
585587 ) ; // More checking is performed in `axSerPairCheck`.
586- clientsCheckStatKey . set ( client . key , 1 ) ;
588+ clientsForCheckingStatKey . set ( client . key , 1 ) ;
587589 }
588590
589- clientsByQueryKey . set ( queryKey , client ) ;
591+ clientsForLookup . set ( clientKey , client ) ;
590592
591593 callOnlyOnce ( registers , function ( ) {
592594 registers . registerProcessor ( registers . PRIORITY . PROCESSOR . AXIS_STATISTICS , {
@@ -597,8 +599,8 @@ export function requireAxisStatistics(
597599 } ) ;
598600}
599601
600- let clientsCheckStatKey : HashMap < 1 , AxisStatKey > ;
602+ let clientsForCheckingStatKey : HashMap < 1 , AxisStatKey > ;
601603if ( __DEV__ ) {
602- clientsCheckStatKey = createHashMap ( ) ;
604+ clientsForCheckingStatKey = createHashMap ( ) ;
603605}
604- const clientsByQueryKey : HashMap < AxisStatKeyedClient , ClientQueryKey > = createHashMap ( ) ;
606+ const clientsForLookup : HashMap < AxisStatKeyedClient , ClientLookupKey > = createHashMap ( ) ;
0 commit comments