11import React , { ReactNode } from 'react' ;
22
3- import { isNumber } from 'lodash ' ;
3+ import { ValueAssessment , EntityMetaData } from '@antv/ava ' ;
44
55import { ArrowDown , ArrowUp } from '../../../assets/icons' ;
66import { createEntityPhraseFactory } from '../createEntityPhraseFactory' ;
77import { NTV_PREFIX_CLS } from '../../../constants' ;
88import { getThemeColor } from '../../../theme' ;
9+ import { isNumberLike } from '../../../../utils' ;
910
10- import { ValueAssessment , EntityMetaData } from '@antv/ava' ;
1111import type { SpecificEntityPhraseDescriptor } from '../plugin-protocol.type' ;
1212import type { ThemeType } from '../../../types' ;
1313
@@ -37,7 +37,7 @@ const defaultDeltaValueDescriptor: SpecificEntityPhraseDescriptor = {
3737 classNames : ( value , { assessment } ) => [ `${ NTV_PREFIX_CLS } -value-${ assessment } ` ] ,
3838 getText : getAssessmentText ,
3939 tooltip : {
40- title : ( value , metadata ) => ( isNumber ( metadata . origin ) ? `${ metadata . origin } ` : null ) ,
40+ title : ( value , metadata ) => ( isNumberLike ( metadata . origin ) ? `${ metadata . origin } ` : null ) ,
4141 } ,
4242} ;
4343
@@ -51,7 +51,7 @@ const defaultRatioValueDescriptor: SpecificEntityPhraseDescriptor = {
5151 classNames : ( value , { assessment } ) => [ `${ NTV_PREFIX_CLS } -value-${ assessment } ` ] ,
5252 getText : getAssessmentText ,
5353 tooltip : {
54- title : ( value , metadata ) => ( isNumber ( metadata . origin ) ? `${ metadata . origin } ` : null ) ,
54+ title : ( value , metadata ) => ( isNumberLike ( metadata . origin ) ? `${ metadata . origin } ` : null ) ,
5555 } ,
5656} ;
5757
0 commit comments