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(line): fix visual gradient when coords are between two stops. #15938

Merged
merged 2 commits into from
Oct 25, 2021

Conversation

pissang
Copy link
Contributor

@pissang pissang commented Oct 25, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fix clipped stops of gradient in line may be wrong when whole line are between the only two stops of visual map component

Fixed issues

#15885
#15877

Details

Before: What was the problem?

image

After: How is it fixed in this PR?

image

Misc

  • The API has been changed (apache/echarts-doc#xxx).
  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

NA.

Others

Merging options

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented Oct 25, 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.

plainheart
plainheart previously approved these changes Oct 25, 2021
Copy link
Member

@plainheart plainheart left a comment

Choose a reason for hiding this comment

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

Checked it again. The case in #15877 will show nothing because of the span limit.

if (coordSpan < 1e-3) {
return 'transparent';
}

Maybe we can make it smaller, for example, 1e-5 or 1e-8? Or set the tinyExtent like before?

@pissang
Copy link
Contributor Author

pissang commented Oct 25, 2021

@plainheart Created a new commit to revert the change described in https://github.com/apache/echarts/pull/15711/files#r735460339

@pissang pissang merged commit 7202eb5 into master Oct 25, 2021
@pissang pissang deleted the fix-line-visual branch October 25, 2021 10:37
@echarts-bot
Copy link

echarts-bot bot commented Oct 25, 2021

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
Development

Successfully merging this pull request may close these issues.

2 participants