Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: When component tooltip.formatter is not specified, use a specific default formatter, rather than use global tooltip.formatter as default. Fix #14939 #14972

Merged
merged 1 commit into from
May 18, 2021

Conversation

100pah
Copy link
Member

@100pah 100pah commented May 17, 2021

fix: When component tooltip.formatter is not specified, use a specific default formatter, rather than use global tooltip.formatter as default.

That because the global tooltip.formatter is usually configured for series. But tooltip formatter usually can not be shared by series and components (they have different params). So the global tooltip.formatter is usually not applicable for component.

This PR make a specific default tooltip formatter for component, which returns the item name.

Since v5.1.0 component tooltip inherits the configs of the global tooltip. So there is no such issue before v5.1.0.

Fix #14939

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

test case: test/tooltip-component.html (the last case).

…ip.formatter, but has component specific default tooltip.formatter.
@echarts-bot
Copy link

echarts-bot bot commented May 17, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@100pah 100pah changed the title fix: When component tooltip.formatter is not specified, use a specific default formatter, rather than use global tooltip.formatter as default. fix: When component tooltip.formatter is not specified, use a specific default formatter, rather than use global tooltip.formatter as default. Fix #14939 May 17, 2021
@pissang pissang merged commit e112417 into master May 18, 2021
@echarts-bot
Copy link

echarts-bot bot commented May 18, 2021

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@pissang pissang deleted the fix/legend-tooltip-inherit branch May 18, 2021 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v5.x版本legend内的tooltip会继承外层的tooltip配置
2 participants