(
textStyle: TooltipOption['textStyle']
)
| 44 | const TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1'; |
| 45 | |
| 46 | function getTooltipLineHeight( |
| 47 | textStyle: TooltipOption['textStyle'] |
| 48 | ) { |
| 49 | const lineHeight = textStyle.lineHeight; |
| 50 | if (lineHeight == null) { |
| 51 | return TOOLTIP_LINE_HEIGHT_CSS; |
| 52 | } |
| 53 | else { |
| 54 | return `line-height:${encodeHTML(lineHeight + '')}px`; |
| 55 | } |
| 56 | } |
| 57 | // TODO: more textStyle option |
| 58 | function getTooltipTextStyle( |
| 59 | textStyle: TooltipOption['textStyle'], |
no test coverage detected