Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
skw398 authored Jun 23, 2023
1 parent 436ef92 commit b42d022
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ or
// Another instantiation
// All the same parameters can be used.
PieChart(fruits) { fruit in
Item(
PieChart.Item(
value: fruit.count,
color: fruit.color
)
Expand All @@ -55,7 +55,7 @@ or
fruits,
backgroundColor: .black
) {
Item(
PieChart.Item(
value: $0.count,
color: $0.color
)
Expand All @@ -66,23 +66,23 @@ or
```swift
PieChart(
values: fruits.map(\.count),
config: Config(space: 0.5) // 0~1.0
configuration: PieChart.Configuration(space: 0.5) // 0~1.0
)
```

#### 5.
```swift
PieChart(
values: fruits.map(\.count),
config: Config(hole: 0.6) // 0~1.0
configuration: PieChart.Configuration(hole: 0.6) // 0~1.0
)
```

#### 6.
```swift
PieChart(
values: fruits.map(\.count),
config: Config(space: 0.5, hole: 0.6)
configuration: PieChart.Configuration(space: 0.5, hole: 0.6)
)
```

Expand All @@ -91,7 +91,7 @@ or
PieChart(
values: [Int](repeating: 1, count: 7),
backgroundColor: .gray,
config: Config(
configuration: PieChart.Configuration(
pieSizeRatio: 1 // 0~1.0 Default 0.8
)
)
Expand All @@ -104,7 +104,7 @@ or
PieChart(
values: [Int](repeating: 1, count: 7),
backgroundColor: .gray,
config: Config(
configuration: PieChart.Configuration(
pieSizeRatio: 0.5
)
)
Expand All @@ -119,7 +119,7 @@ or
values: [Int](repeating: 1, count: 7),
colors: [.red, .orange, .yellow, .green, .cyan, .blue, .purple],
backgroundColor: .black,
config: Config(
configuration: PieChart.Configuration(
space: 0.3, hole: 0.5, pieSizeRatio: 0.7
)
)
Expand Down

0 comments on commit b42d022

Please sign in to comment.