File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export interface VictoryPieProps
38
38
VictoryDatableProps ,
39
39
VictoryLabelableProps ,
40
40
VictoryMultiLabelableProps {
41
+ curvedLabelComponent ?: React . ReactElement ;
41
42
colorScale ?: ColorScalePropType ;
42
43
cornerRadius ?: SliceNumberOrCallback < SliceProps , "cornerRadius" > ;
43
44
endAngle ?: number ;
@@ -160,6 +161,7 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
160
161
"groupComponent" ,
161
162
"containerComponent" ,
162
163
"labelIndicatorComponent" ,
164
+ "curvedLabelComponent"
163
165
] ;
164
166
165
167
// Overridden in victory-native
@@ -214,7 +216,7 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
214
216
// For curved labels, we need to create a path component with id and path value of
215
217
// label arc. We need to pass this id to the href of textPath component which will
216
218
// have label value(tspan) as child component.
217
- if ( labelPlacement === "curved" ) {
219
+ if ( labelPlacement === "curved" && curvedLabelComponent ) {
218
220
const labelPathComponents = this . dataKeys . map ( ( _dataKey , index ) => {
219
221
const curvedLabelProps : CurvedLabelProps = this . getComponentProps (
220
222
curvedLabelComponent ,
@@ -228,7 +230,6 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
228
230
d : curvedLabelProps . path ,
229
231
id : curvedLabelProps . id ,
230
232
key : index ,
231
- textAnchor : "middle" ,
232
233
} ) ;
233
234
} ) ;
234
235
children . push ( ...labelPathComponents ) ;
You can’t perform that action at this time.
0 commit comments