Skip to content

Commit e800e1b

Browse files
fix syntax error in sample code in documentation (#2738)
1 parent ea512f5 commit e800e1b

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

docs/src/content/docs/victory-pie.md

+17-20
Original file line numberDiff line numberDiff line change
@@ -526,23 +526,22 @@ y={(d) => d.value + d.error}
526526
The `labelIndicator` prop defines the label indicator line between labels and the pie chart. If this prop is used as a boolean,then the default indicator will be displayed. To customize or pass your own styling `<LineSegment/>` can be passed to labelIndicator. LabelIndicator is functional only when labelPosition = "centroid". To adjust the labelIndicator length, `labelIndicatorInnerOffset` and `labelIndicatorOuterOffset` props can be used alongside labelIndicator.
527527

528528
```playground
529-
<VictoryPie
530-
data={sampleData}
531-
labelIndicator
532-
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
533-
/>
534-
<VictoryPie
535-
data={sampleData}
536-
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
537-
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
538-
/>
539-
<VictoryPie
540-
data={sampleData}
541-
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
542-
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
543-
labelIndicatorInnerOffset={10}
544-
labelIndicatorOuterOffset={15}
545-
/>
529+
<div>
530+
<VictoryPie
531+
data={sampleData}
532+
labelIndicator
533+
/>
534+
<VictoryPie
535+
data={sampleData}
536+
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
537+
/>
538+
<VictoryPie
539+
data={sampleData}
540+
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
541+
labelIndicatorInnerOffset={10}
542+
labelIndicatorOuterOffset={5}
543+
/>
544+
</div>
546545
```
547546
## labelIndicatorInnerOffset
548547

@@ -554,7 +553,6 @@ The `labelIndicatorInnerOffset` prop defines the offset by which the indicator l
554553
<VictoryPie
555554
data={sampleData}
556555
labelIndicator
557-
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
558556
labelIndicatorInnerOffset={10}
559557
/>
560558
```
@@ -569,8 +567,7 @@ The `labelIndicatorOuterOffset` prop defines the offset by which the indicator l
569567
<VictoryPie
570568
data={sampleData}
571569
labelIndicator
572-
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
573-
labelIndicatorOuterOffset={10}
570+
labelIndicatorOuterOffset={5}
574571
/>
575572
```
576573

0 commit comments

Comments
 (0)