susiwen8 commented on code in PR #21597:
URL: https://github.com/apache/echarts/pull/21597#discussion_r3206148087


##########
src/chart/chord/ChordPiece.ts:
##########
@@ -26,9 +26,18 @@ import type Model from '../../model/Model';
 import type { GraphNode } from '../../data/Graph';
 import { getLabelStatesModels, setLabelStyle } from '../../label/labelStyle';
 import type { BuiltinTextPosition } from 'zrender/src/core/types';
-import { setStatesStylesFromModel, toggleHoverEmphasis } from 
'../../util/states';
+import { setStatesStylesFromModel, SPECIAL_STATES, toggleHoverEmphasis } from 
'../../util/states';
 import { getECData } from '../../util/innerStore';
 
+const RADIAN = Math.PI / 180;
+
+function getLabelRotation(rotate: number | 'radial', midAngle: number, dx: 
number): number {
+    if (rotate === 'radial') {
+        return dx < 0 ? -midAngle + Math.PI : -midAngle;

Review Comment:
   Updated in b45a9b7: chord radial label rotation now uses normalized-angle 
boundary logic aligned with sunburst, and the unit test covers a non-default 
`startAngle` boundary case at 270 degrees.
   
   `startAngle` is already applied by `chordLayout` before `ChordPiece` 
receives the node `midAngle`, so this keeps the existing startAngle behavior 
while avoiding `dx < 0` precision-sensitive flips around the vertical 
boundaries.



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