echarts icon indicating copy to clipboard operation
echarts copied to clipboard

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

Open dexter-cuijian opened this issue 8 months ago • 5 comments

Brief Information

This pull request is in the type of:

  • [x] 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

  • #20997

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.

  • [x] 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

dexter-cuijian avatar Jun 04 '25 11:06 dexter-cuijian

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.

echarts-bot[bot] avatar Jun 04 '25 11:06 echarts-bot[bot]

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

Ovilia avatar Jun 13 '25 02:06 Ovilia

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

dexter-cuijian avatar Jun 13 '25 03:06 dexter-cuijian

企业微信截图_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

dexter-cuijian avatar Jun 13 '25 06:06 dexter-cuijian

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

Ovilia avatar Jun 13 '25 07:06 Ovilia

Is this PR ready to be merged? thx

zeyongTsai avatar Oct 09 '25 07:10 zeyongTsai