akashsonune commented on code in PR #21306:
URL: https://github.com/apache/echarts/pull/21306#discussion_r2417391962


##########
src/chart/sunburst/SunburstPiece.ts:
##########
@@ -233,8 +233,9 @@ class SunburstPiece extends graphic.Sector {
             }
             else {
                 if (!textAlign || textAlign === 'center') {
-                    // Put label in the center if it's a circle
-                    if (angle === 2 * Math.PI && layout.r0 === 0) {
+                    // Put label in the center if it's a circle or if it's the 
data root node and has no inner radius
+                    if ((angle === 2 * Math.PI && layout.r0 === 0)
+                        || (this.node.parentNode && !this.node.parentNode.name 
&& layout.r0 === 0)) {

Review Comment:
   added test file. also, made a slight change for multiple root cases, where 
the labels were overlapping.



-- 
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