@@ -145,7 +145,7 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
145
145
standalone : true ,
146
146
dataComponent : < Slice /> ,
147
147
labelComponent : < VictoryLabel /> ,
148
- curvedLabelComponent : < CurvedLabel /> ,
148
+ curvedLabelComponent : < CurvedLabel /> ,
149
149
containerComponent : < VictoryContainer /> ,
150
150
groupComponent : < g /> ,
151
151
sortOrder : "ascending" ,
@@ -176,7 +176,7 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
176
176
labelIndicator,
177
177
labelPosition,
178
178
labelPlacement,
179
- curvedLabelComponent
179
+ curvedLabelComponent,
180
180
} = props ;
181
181
182
182
if ( ! groupComponent ) {
@@ -212,28 +212,28 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
212
212
children . push ( ...dataComponents ) ;
213
213
}
214
214
215
- // For curved labels, we need to create a path component with id and path value of
216
- // label arc. We need to pass this id to the href of textPath component which will
215
+ // For curved labels, we need to create a path component with id and path value of
216
+ // label arc. We need to pass this id to the href of textPath component which will
217
217
// have label value(tspan) as child component.
218
218
if ( labelPlacement === "curved" ) {
219
- const labelPathComponents = this . dataKeys . map ( ( _dataKey , index ) => {
220
- const curvedLabelProps = this . getComponentProps (
221
- curvedLabelComponent ,
222
- "curvedLabels" ,
223
- index ,
224
- ) ;
219
+ const labelPathComponents = this . dataKeys . map ( ( _dataKey , index ) => {
220
+ const curvedLabelProps = this . getComponentProps (
221
+ curvedLabelComponent ,
222
+ "curvedLabels" ,
223
+ index ,
224
+ ) ;
225
+
226
+ // create labelPath
227
+ const pathComponent : React . ReactElement = < Path /> ;
228
+ return React . cloneElement ( pathComponent , {
229
+ d : curvedLabelProps . path ,
230
+ id : curvedLabelProps . id ,
231
+ key : index ,
232
+ textAnchor : "middle" ,
233
+ } ) ;
234
+ } ) ;
235
+ children . push ( ...labelPathComponents ) ;
225
236
226
- //create labelPath
227
- const pathComponent :React . ReactElement = < Path />
228
- return React . cloneElement ( pathComponent , {
229
- d : curvedLabelProps . path ,
230
- id : curvedLabelProps . id ,
231
- key : index ,
232
- textAnchor :"middle"
233
- } ) ;
234
- } )
235
- children . push ( ...labelPathComponents ) ;
236
-
237
237
const curvedLabelComponents = this . dataKeys
238
238
. map ( ( _dataKey , index ) => {
239
239
const curvedLabelProps = this . getComponentProps (
@@ -254,8 +254,7 @@ class VictoryPieBase extends React.Component<VictoryPieProps> {
254
254
( comp : React . ReactElement | undefined ) : comp is React . ReactElement =>
255
255
comp !== undefined ,
256
256
) ;
257
- children . push ( ...curvedLabelComponents ) ;
258
-
257
+ children . push ( ...curvedLabelComponents ) ;
259
258
} else if ( labelComponent ) {
260
259
const labelComponents = this . dataKeys
261
260
. map ( ( _dataKey , index ) => {
0 commit comments