Mr-Lixiaoqaing opened a new issue, #16916:
URL: https://github.com/apache/echarts/issues/16916

   ### Version
   
   4.9x
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   series: [
                           {
                               name: 'Access From',
                               type: 'pie',
                               radius: '50%',
                               label: {
                                   alignTo: 'labelLine',
                                   formatter(data) {
                                       console.log(data.data)
                                       const {name, value} = data.data
                                       return "{block| ''}" + value + '测试'
                                   },
                                   rich: {
                                       block: {
                                           width: 5,
                                           height: 20,
                                           backgroundColor: '#f00',
                                       }
                                   },
                               },
                               data: [
                                   { value: 1, name: '测试' },
                                   { value: 2, name: '测试' },
                                   { value: 3, name: '测试' },
                               ],
                           }
                       ]
   
   ### Current Behavior
   
   
![image](https://user-images.githubusercontent.com/52234930/164143733-9c54b760-64ba-4ba4-816e-01801493b48f.png)
   
图片为想要实现的效果,可以看到最外层为左右结构,然后右边是上下结构。但由于无法在formatter里面区分左右结构,因此在使用"\n"进行换行时,只能将内容分为"上下"两个部分。所以我没办法实现设计图上的效果。
   
   ### Expected Behavior
   
   希望能够在rich或者formatter中进行结构上的区分,就像html那样,以实现更丰富的效果
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   
![image](https://user-images.githubusercontent.com/52234930/164143256-e926ca29-e79b-4c57-8f82-e639d170b790.png)
   
![image](https://user-images.githubusercontent.com/52234930/164143303-b4a5d6a9-4a6f-4dc9-95e1-3c83d15a0f37.png)
   
   


-- 
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: [email protected]

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