提交 60c5897d 编写于 作者: S susiwen8

Fix typo and change layout for tooltip content

上级 785c6e2d
......@@ -155,7 +155,7 @@ class TooltipModel extends ComponentModel<TooltipOption> {
// otherwise it will always override those styles on option.axisPointer.
},
textStyle: {
color: '#000',
color: '#666',
fontSize: 14
}
};
......
......@@ -501,7 +501,7 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode
: tooltipDimLen
? formatSingleValue(retrieveRawValue(data, dataIndex, tooltipDims[0]))
: formatSingleValue(isValueArr ? value[0] : value);
const content = `<strong>${formattedValue.content}<strong>`;
const content = `<strong style="float: right; margin-left: 20px; color: #000;">${formattedValue.content}</strong>`;
const markName = series.seriesIndex + 'at' + markerId;
const colorEl = getTooltipMarker({
......@@ -520,21 +520,21 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode
seriesName = '';
}
seriesName = seriesName
? encodeHTML(seriesName) + (!multipleSeries ? newLine : ': ')
? encodeHTML(seriesName) + (!multipleSeries ? newLine : ' ')
: '';
colorStr = typeof colorEl === 'string' ? colorEl : colorEl.content;
const html = !multipleSeries
? seriesName + colorStr
+ (name
? encodeHTML(name) + ': ' + content
? `${encodeHTML(name)}${content}`
: content
)
: colorStr + seriesName + content;
return {
html: html,
markers: markers
html,
markers
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册