File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/vchart/src/chart/base Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1395,7 +1395,14 @@ export class BaseChart<T extends IChartSpec> extends CompilableBase implements I
13951395 }
13961396 } ) ;
13971397 const isUnableValue =
1398- isNil ( value ) || ! dimensionInfo || dimensionInfo . every ( d => isDiscrete ( d . axis . getScale ( ) . type ) && isNil ( d . index ) ) ;
1398+ // 如果是 nil 值 那么认为数据不可用
1399+ isNil ( value ) ||
1400+ // 如果没有 dimensionInfo 那么也认为数据不可用
1401+ ! dimensionInfo ||
1402+ // 如果是离散轴,并且没有这一项,或者数据为空 那么也认为数据不可用
1403+ dimensionInfo . every (
1404+ d => isDiscrete ( d . axis . getScale ( ) . type ) && ( isNil ( d . index ) || d . data . every ( _data => _data . datum . length === 0 ) )
1405+ ) ;
13991406 // tooltip
14001407 if ( opt . tooltip !== false ) {
14011408 const tooltip = this . getComponentsByType ( ComponentTypeEnum . tooltip ) [ 0 ] as unknown as ITooltip ;
You can’t perform that action at this time.
0 commit comments