antvis/G2

5.1.15: tooltiip .g2-tooltip defaulting to Roboto-Regular

Opened this issue · 3 comments

How to reproduce:
Take a simple barchart with a tooltip:
.g2-tooltip class is 'font-family': 'Roboto-Regular'
Which is not installed in my project so it looks inconsistent with e.g. legend and other fonts selected by default for the chart

Expected
'font-family': inherit OR whatever font is selected by default for other chart elements like legend

Workaround:

chart.interaction('tooltip', {
	css: {
		'.g2-tooltip': {
			'font-family': `inherit` <------------
		}
	}
});

Software
macOS, Chrome

please comment and close if you don't think this is an issue....

the font of tooltip and legend should be the same value.

the font of tooltip and legend should be the same value.

Then its a bug ;-)