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(markArea): hide labels when markArea is not inside grid #12591 #12669

merged 4 commits into from Aug 5, 2020


Copy link

@Ovilia Ovilia commented May 20, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Hide labels when markArea is not inside grid

Fixed issues


Before: What was the problem?

MarkArea label is displayed when the markArea is outside of grid.

屏幕快照 2020-05-20 11 42 58

After: How is it fixed in this PR?

MarkArea label is not displayed when the markArea is outside of grid.

屏幕快照 2020-05-20 11 42 37


Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs



Merging options

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

Other information

Copy link

echarts-bot bot commented May 20, 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.

@Ovilia Ovilia added this to the 4.9.0 milestone May 20, 2020
var x = xScale.parse(xValue);
var y = yScale.parse(yValue);
// If is infinity, the axis should be considered not clipped
if ((isInifinity(x) || x >= xExtent[0] && x <= xExtent[1])
Copy link

Choose a reason for hiding this comment

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

There is a builtin method to check if value is in the extent


@pissang pissang merged commit 8d3291e into master Aug 5, 2020
Copy link

echarts-bot bot commented Aug 5, 2020

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

@pissang pissang deleted the fix-12591 branch August 5, 2020 03:19
Copy link

Hi team,
After upgrading to Echarts 4.9.0, The fix from this branch has removed my expected behavior for mark area. Before 4.9.0, when I zoomed in at the mark area till its border exceeded the grid, I still saw the mark area background and its label. But now, at Echarts 4.9.0, the mark area will completely disappear. I think it's a bug from this fix. What do you guys think?

Copy link

Echarts 4.9.0, the mark area will disappear when i scroll the bar

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

4 participants