Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix syntax error in sample code in documentation #2738

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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