Ovilia opened a new pull request #15182:
URL: https://github.com/apache/echarts/pull/15182


   <!-- 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 ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   
   This PR supports polar bar label positions according to the sectors.
   
   ### Fixed issues
   
   - #14616 
   
   ## Details
   
   ### Before: What was the problem?
   
   Label positions can only calculated by the bounding box of the sectors but 
not according to sector shapes.
   
   
![image](https://user-images.githubusercontent.com/779050/122531634-46e15400-d052-11eb-8de7-0a56624a6cbc.png)
   
![image](https://user-images.githubusercontent.com/779050/122531779-6c6e5d80-d052-11eb-849c-88c4380a4232.png)
   
   
   ### After: How is it fixed in this PR?
   
   Along with the old values of label positions (like `'inside'`), this PR 
provides new position values:
   
   ```js
   'start' | 'end'
       | 'startTop' | 'insideStartTop' | 'insideStart' | 'insideStartBottom' | 
'startBottom'
       | 'middleTop' | 'insideMiddleTop' | 'middle' | 'insideMiddleBottom' | 
'middleBottom'
       | 'endTop' | 'insideEndTop' | 'insideEnd' | 'insideEndBottom' | 
'endBottom'
   ```
   
   Take `'middle'` for example:
   
   
![image](https://user-images.githubusercontent.com/779050/122531903-8c058600-d052-11eb-8caf-6279e8301b16.png)
   
![image](https://user-images.githubusercontent.com/779050/122531949-93c52a80-d052-11eb-91d8-4c43b7036b01.png)
   
   This could be useful when creating polar bar labels.
   
   ## Misc
   
   <!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
   
   - [x] The API has been changed (apache/echarts-doc#xxx).
   - [x] This PR depends on ZRender changes (ecomfe/zrender#774).
   
   ### Related test cases or examples to use the new APIs
   
   - test/bar-polar-label.html
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### 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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to