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(geo): label formatter in geo works incorrectly, tweaks #10666 & #8612. #12762

merged 6 commits into from Jun 22, 2020


Copy link

@plainheart plainheart commented Jun 6, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Because of the change about the structure of normal style and emphasis style, original logic about fetching formatter of label has been not suitable. There are some changes to be done.

Original way to fetch label formatter:
normal: label.formatter (It's okay now)
emphasis: label.emphasis.formatter(in #10666, a dot is also missing, but even if we add it, it is still not correct for present option structure).

Present way to fetch label formatter:
normal: label.formatter (same as original way)
emphasis: emphasis.label.formatter (See geo.emphasis.label.formatter).

Fixed issues


Before: What was the problem?

geo.label.formatter is not working.

After: How is it fixed in this PR?

Using the way suitable for current option structure.

var formatter = regionModel.get((status === 'normal' ? '' : 'emphasis.') + 'label.formatter');



Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs

Please refer to test/geo-labelFormatter.html.


Merging options

  • Please squash the commits into a single one when merge.

Copy link

echarts-bot bot commented Jun 6, 2020

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.

@pissang pissang added this to the 4.9.0 milestone Jun 22, 2020
Copy link

pissang commented Jun 22, 2020

Looks good.

@pissang pissang merged commit 300f75d into apache:master Jun 22, 2020
Copy link

echarts-bot bot commented Jun 22, 2020

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

@plainheart plainheart deleted the fix-geo-label-formatter branch Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants