File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export interface PieStateOption<TCbParams = never> {
6868 labelLine ?: PieLabelLineOption
6969}
7070interface PieLabelOption extends Omit < SeriesLabelOption , 'rotate' | 'position' > {
71- rotate ?: number | boolean | 'radial' | 'tangential'
71+ rotate ?: number | boolean | 'radial' | 'tangential' | 'tangential-fixed'
7272 alignTo ?: 'none' | 'labelLine' | 'edge'
7373 edgeDistance ?: string | number
7474 /**
Original file line number Diff line number Diff line change @@ -484,15 +484,15 @@ export default function pieLabelLayout(
484484 const radialAngle = nx < 0 ? - midAngle + PI : - midAngle ;
485485 labelRotate = radialAngle ;
486486 }
487- else if ( rotate === 'tangential'
487+ else if ( rotate === 'tangential' || rotate === 'tangential-fixed'
488488 && labelPosition !== 'outside' && labelPosition !== 'outer'
489489 ) {
490490 let rad = Math . atan2 ( nx , ny ) ;
491491 if ( rad < 0 ) {
492492 rad = PI * 2 + rad ;
493493 }
494494 const isDown = ny > 0 ;
495- if ( isDown ) {
495+ if ( isDown && rotate !== 'tangential-fixed' ) {
496496 rad = PI + rad ;
497497 }
498498 labelRotate = rad - PI ;
You can’t perform that action at this time.
0 commit comments