Berke-Alp commented on issue #9700:
URL: https://github.com/apache/echarts/issues/9700#issuecomment-1342423748

   Hmm... right after this issue, I tried different ***r*** values and I came 
up with this solution:
   
   ```js
   let width = $chartDom.width()
                       let height = $chartDom.height()
                       for (let i = 0; i < data.length; i++) {
                           data[i].itemStyle = {
                               color: {
                                   type: 'radial',
                                   x: width / 2,
                                   y: height / 2,
                                   r: (data[i].progress * 1.56) + (width * 
0.05),
                                   colorStops: [
                                       {offset:0.99, color: 
data[i].itemStyle.color.colorStops[0].color },
                                       {offset:1, color: '#939393'}
                                   ],
                                   global: true
                               }
                           }
   
                           for (let c of data[i].children) {
                               c.itemStyle = {
                                   color: {
                                       type: 'radial',
                                       x: width / 2,
                                       y: height / 2,
                                       r: (c.progress * 1.05) + (width * 0.2),
                                       colorStops: [
                                           {offset:0.99, color: 
data[i].itemStyle.color.colorStops[0].color},
                                           {offset:1, color: '#939393'}
                                       ],
                                       global: true
                                   }
                               }
                           }
                       }
   ```
   
   And the result is so good.
   
![image](https://user-images.githubusercontent.com/20144149/206419021-07a09952-e545-4928-926d-d2eae55d78be.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: 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

Reply via email to