MCPcopy Create free account
hub / github.com/apache/echarts / getTooltipLineHeight

Function getTooltipLineHeight

src/component/tooltip/tooltipMarkup.ts:46–56  ·  view source on GitHub ↗
(
    textStyle: TooltipOption['textStyle']
)

Source from the content-addressed store, hash-verified

44const TOOLTIP_LINE_HEIGHT_CSS = 'line-height:1';
45
46function 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
58function getTooltipTextStyle(
59 textStyle: TooltipOption['textStyle'],

Callers 2

buildSectionFunction · 0.85
wrapBlockHTMLFunction · 0.85

Calls 1

encodeHTMLFunction · 0.85

Tested by

no test coverage detected