Skip to content

Commit

Permalink
fix syntax error in sample code in documentation (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
acharyakavita authored Jan 25, 2024
1 parent ea512f5 commit e800e1b
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions docs/src/content/docs/victory-pie.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,23 +526,22 @@ y={(d) => d.value + d.error}
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.

```playground
<VictoryPie
data={sampleData}
labelIndicator
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
/>
<VictoryPie
data={sampleData}
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
/>
<VictoryPie
data={sampleData}
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
labelIndicatorInnerOffset={10}
labelIndicatorOuterOffset={15}
/>
<div>
<VictoryPie
data={sampleData}
labelIndicator
/>
<VictoryPie
data={sampleData}
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
/>
<VictoryPie
data={sampleData}
labelIndicator={<LineSegment style = {{stroke:"red", strokeDasharray:1,fill: "none",}}/>}
labelIndicatorInnerOffset={10}
labelIndicatorOuterOffset={5}
/>
</div>
```
## labelIndicatorInnerOffset

Expand All @@ -554,7 +553,6 @@ The `labelIndicatorInnerOffset` prop defines the offset by which the indicator l
<VictoryPie
data={sampleData}
labelIndicator
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
labelIndicatorInnerOffset={10}
/>
```
Expand All @@ -569,8 +567,7 @@ The `labelIndicatorOuterOffset` prop defines the offset by which the indicator l
<VictoryPie
data={sampleData}
labelIndicator
style={{ labels: { fill: "white", fontSize: 20, fontWeight: "bold" } }}
labelIndicatorOuterOffset={10}
labelIndicatorOuterOffset={5}
/>
```

Expand Down

1 comment on commit e800e1b

@vercel
Copy link

@vercel vercel bot commented on e800e1b Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.