File tree 1 file changed +4
-1
lines changed
packages/vchart/src/plugin/components/tooltip-handler
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -246,9 +246,11 @@ export class DomTooltipHandler extends BaseTooltipHandler {
246
246
const colName = colDiv . getAttribute ( 'data-col' ) ;
247
247
248
248
if ( colName && columns . includes ( colName ) ) {
249
+ const hideColumn = colName === 'shape' && content . every ( c => ! c . hasShape || ! c . shapeType ) ;
250
+
249
251
setStyleToDom ( colDiv , {
250
252
...( this . _domStyle as any ) [ colName ] ,
251
- display : 'inline-block' ,
253
+ display : hideColumn ? 'none' : 'inline-block' ,
252
254
verticalAlign : 'top'
253
255
} ) ;
254
256
const rows = [ ...( colDiv . children as any ) ] as HTMLElement [ ] ;
@@ -280,6 +282,7 @@ export class DomTooltipHandler extends BaseTooltipHandler {
280
282
styleByRow = { ...styleByRow , ...getTextStyle ( entry . valueStyle ) } ;
281
283
}
282
284
} else if ( colName === 'shape' ) {
285
+ styleByRow . display = entry . hasShape ? 'inline-block' : 'none' ;
283
286
row . innerHTML = getSvgHtml ( entry ) ;
284
287
}
285
288
You can’t perform that action at this time.
0 commit comments