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): markArea range in bar series #18130 #18229

Merged
merged 5 commits into from
Mar 6, 2023
Merged

fix(markArea): markArea range in bar series #18130 #18229

merged 5 commits into from
Mar 6, 2023

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Feb 2, 2023

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fix the markArea range problem in bar series.

Fixed issues

#18130 and #18099

Details

Before: What was the problem?

The markArea range is wrong in bar series when the axisTick is not all displayed. This was a bug introduced in #17098.

After: How does it behave after the fixing?

tickValue is the index in the total axis range, rather than the visible part. After the fixing, it works well when axis has interval or with dataZoom.

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

bar-markArea.html

Others

Merging options

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented Feb 2, 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
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.

As additional information,

#18150 and #18159 have reported another related bug that was caused by a NPE at markerHelper.ts#L108.
When using markLine in the pie series, the coordinateSystem will be undefined, which causes the dims to be undefined.

And the access to the dims variable at markerHelper.ts#L155 should also be guarded.

@Ovilia
Copy link
Contributor Author

Ovilia commented Feb 27, 2023

@plainheart Thanks. I've updated the logic and put that in the test. Please check if anything is missing.

@Ovilia Ovilia modified the milestones: 5.5.0, 5.4.2 Mar 3, 2023
src/component/marker/markerHelper.ts Outdated Show resolved Hide resolved
test/bar-markArea.html Show resolved Hide resolved
test/bar-markArea.html Show resolved Hide resolved
test/bar-markArea.html Show resolved Hide resolved
@Ovilia Ovilia merged commit 2752bea into master Mar 6, 2023
@echarts-bot
Copy link

echarts-bot bot commented Mar 6, 2023

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

@ily-salamat
Copy link

Hi @Ovilia, I opened a new issue here #18499 related to this PR, could you check it please and thanks for your efforts

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.

[Bug] MarkArea is broken in version 5.4.1 markArea xAxis does not zoom for category axis and bar series
3 participants