Skip to content

Commit

Permalink
Fix: tooltip text style font size unit
Browse files Browse the repository at this point in the history
  • Loading branch information
susiwen8 committed Jan 6, 2021
1 parent 927298d commit 028ffd3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/component/tooltip/tooltipMarkup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ function getTooltipTextStyle(
valueStyle: TextStyle
} {
const nameFontColor = textStyle.color || '#6e7079';
const nameFontSize = textStyle.fontSize || '12px';
const nameFontSize = textStyle.fontSize || 12;
const nameFontWeight = textStyle.fontWeight || '400';
const valueFontColor = textStyle.color || '#464646';
const valueFontSize = textStyle.fontSize || '14px';
const valueFontSize = textStyle.fontSize || 14;
const valueFontWeight = textStyle.fontWeight || '900';

if (renderMode === 'html') {
return {
nameStyle: `font-size:${nameFontSize};color:${nameFontColor};font-weight:${nameFontWeight}`,
valueStyle: `font-size:${valueFontSize};color:${valueFontColor};font-weight:${valueFontWeight}`
nameStyle: `font-size:${nameFontSize}px;color:${nameFontColor};font-weight:${nameFontWeight}`,
valueStyle: `font-size:${valueFontSize}px;color:${valueFontColor};font-weight:${valueFontWeight}`
};
}
else {
Expand Down

0 comments on commit 028ffd3

Please sign in to comment.