Skip to content

fix: When showMinLabel&showMaxLabel are set to true, the second item will be hidden(#20997) #21013

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

dexter-cuijian
Copy link

@dexter-cuijian dexter-cuijian commented Jun 4, 2025

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

When showMinLabel&showMaxLabel are set to true, the second item will be hidden(

Fixed issues

Details

Before: What was the problem?

When setting showMinLabel and showMaxLabel to true, the label at the second position will be hidden

image

After: How does it behave after the fixing?

When setting showMinLabel and showMaxLabel to true, the label at the second position will not be hidden

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

N.A.

Others

Merging options

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

Other information

Copy link

echarts-bot bot commented Jun 4, 2025

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
Copy link
Contributor

Ovilia commented Jun 13, 2025

Why do I have different result (110% being hidden) when the container height is small before the change of this PR?
image

@dexter-cuijian
Copy link
Author

Why do I have different result (110% being hidden) when the container height is small before the change of this PR? image

image
yAxis.axisLabel.showMinLabel

It can be seen from the API that showMinLabel and showMaxLabel are defined under axisLabel

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.

This change seems to failed the cases of lastLabel:

image

@dexter-cuijian
Copy link
Author

企业微信截图_e53fa6e2-f745-4106-a502-520fd483a473

I found that there is axisLabel.interval, which forces all labels to be displayed when this value is 0. But now it only takes effect for axis.type = 'category', I think it should take effect for all types

@Ovilia
Copy link
Contributor

Ovilia commented Jun 13, 2025

I think the reason why it only supports category is that for value axis, it's meaningless to display labels with interval 0.

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.

3 participants