Ovilia opened a new pull request, #19228: URL: https://github.com/apache/echarts/pull/19228
<!-- Please fill in the following information to help us review your PR more efficiently. --> ## Brief Information This pull request is in the type of: - [ ] bug fixing - [x] new feature - [ ] others ### What does this PR do? <!-- USE ONE SENTENCE TO DESCRIBE WHAT THIS PR DOES. --> In some cases, especially when the canvas size is limited, we wish to confine the axis labels to be within an area rather than may be outside of the canvas when the label text is long. In this PR, I proposed a way to set align/verticalAlign for the first and last labels so that we can make sure they are within the boundary of the grid area. ### Fixed issues #19215 ## Details ### Before: What was the problem? The first and last label may be too long to be displayed when the text is long and the canvas size is limited. <img width="1184" alt="image" src="https://github.com/apache/echarts/assets/779050/498aaa54-3bd5-46d7-841d-2ca561a1e1dc"> ### After: How does it behave after the fixing? When setting `alignMinLabel: 'left', alignMaxLabel: 'right'` we can make sure the text is within the grid's width and the inner labels may hide when overlap. <img width="1171" alt="image" src="https://github.com/apache/echarts/assets/779050/48d5855c-e7cc-4b00-b9d8-264ff1834f49"> ## Document Info One of the following should be checked. - [ ] This PR doesn't relate to document changes - [x] 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org