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(sankey): fix value is undefined in label/edgeLabel formatter #18733

Merged
merged 4 commits into from
Jun 13, 2023

Conversation

plainheart
Copy link
Member

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

  1. Revert changes made in 修复:Sankey桑基图Label Value总是undefined的问题。 #18222 to fix value is undefined in label formatter callback.

    See [Bug] Pie label-formatter show undefined for {c} while echarts.ts compiled to echarts.js #18729.

  2. Correctly fix value is undefined in sankey label & edgeLabel formatter.

  3. Prevent edgeLabel.formatter from inheriting series label.formatter.

Fixed issues

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

Please refer to test/sankey-labelValue.html and the second test case in test/pie-label.html.

Others

Merging options

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented Jun 8, 2023

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.

Copy link

@adoin adoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix pie-label formatter {c} unexpected show undefine issue.

@plainheart
Copy link
Member Author

plainheart commented Jun 9, 2023

@adoin How did you test this branch? I can't reproduce the bad case you mentioned. You have suggested changes, do you mean it works or can't work?

Please use the following commands to get a clean workspace:

$ git clone -b fix/sankey-label-formatter https://github.com/apache/echarts --depth=1
$ cd echarts
$ npm i
$ npm run dev

@plainheart plainheart requested a review from susiwen8 June 13, 2023 05:32
Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ovilia Ovilia merged commit f36dc45 into master Jun 13, 2023
@echarts-bot
Copy link

echarts-bot bot commented Jun 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants