Skip to content

fix(scatter): fix edge scatter may be unexpectedly clipped due to tiny offset#18867

Merged
plainheart merged 4 commits intomasterfrom
fix/scatter-clip
Jul 10, 2023
Merged

fix(scatter): fix edge scatter may be unexpectedly clipped due to tiny offset#18867
plainheart merged 4 commits intomasterfrom
fix/scatter-clip

Conversation

@plainheart
Copy link
Copy Markdown
Member

@plainheart plainheart commented Jul 9, 2023

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fix the scatters near the edge of the coordinate system grid may be unexpectedly clipped due to a tiny offset.

  • Add a parameter tolerance for the CoordinateSystem#getArea method.
  • Set the default tolerance of the scatter series as 0.1 (Got by test, it should cover more scenarios than 1e-2)

Similar to PR #16329.

Fixed issues

Comparison

image

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/clip2.html.

Others

Merging options

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

Other information

The bar series has the same bug. See also #16666. It can be fixed in another PR later.

…y offset.

- add the `tolerance` parameter for `CoordinateSystem#getArea`.
- set the default tolerance of the scatter series as `1e-2`
@echarts-bot
Copy link
Copy Markdown

echarts-bot bot commented Jul 9, 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.

@plainheart plainheart requested review from Ovilia and pissang July 9, 2023 10:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 9, 2023

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-18867@65717db

@plainheart plainheart added this to the 5.5.0 milestone Jul 10, 2023
@plainheart plainheart merged commit 111de66 into master Jul 10, 2023
@plainheart plainheart deleted the fix/scatter-clip branch July 10, 2023 02:51
@echarts-bot
Copy link
Copy Markdown

echarts-bot bot commented Jul 10, 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

2 participants