Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief Information
This pull request is in the type of:
What does this PR do?
fix:
tooltip.confine
defaulttrue
iftooltip.renderMode
isrichText
. And fix the positioning of it to avoid to overflow the container, which will be cut.tooltip.formatter
callback inrenderMode: 'richText'
, previously the concatenating rich text byparams.marker.content
does not work.Series['formatTooltip']
:Add a abstract layer named
TooltipMarkup
(seetooltipMarkup.ts
) to describe the tooltip layout requirements for each series,instead of lots of messy code to concatenate
html
andrichText
in each series.TooltipMarkup
is responsible for generatinghtml
orrichText
finally.Add
TooltipMarkup
is also in charge of sort the tooltip byvalueAsc
,valueDesc
,seriesAsc
,seriesDesc
.With the help of it, a typical tooltip description can be:
PENDING
Do we need to expose API (like
tooltipMarkup.ts#TooltipMarkupStyleCreator
) totooltip.formatter
callback, by which users can add richText style themselves. At present users is not able to do that.But if we expose that kind of API, there is an issue:
should we use ZRender style (use
fill
to describe text color)or ECharts label style (use
color
to describe text color).Like
Other info
test cases: test/new-tooltip.html
related PR: #12947