Skip to content

Commit 124cf9a

Browse files
Update README.md
1 parent 00db22c commit 124cf9a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
11
# SwiftUIPercentChart
22

3+
Easily create graphs that calculate percentiles
4+
5+
## How to install this package
6+
7+
+ Open your project on Xcode
8+
+ Go to Project Tab and select "Package Dependencies"
9+
+ Click "+" and search this package with use git clone url
10+
+ Don't change anything and click Add Package
11+
+ The package will be attached to the targeted application
12+
13+
## How to use this package
14+
15+
```swift
16+
import SwiftUIPercentChart
17+
18+
struct DemoView: View {
19+
var body: some View {
20+
PercentChart(data: [20,10,40,30],
21+
percentValue: 150,
22+
colorData: [],
23+
screenRatio: 0.8,
24+
backgroundColor: .primary)
25+
}
26+
}
27+
```
28+
<img src="https://github.com/devmehmetates/SwiftUIPercentChart/blob/main/Sources/Resources/Ads%C4%B1z.gif" width=200 height=100>
29+
30+
## Variables Usage
31+
32+
| Variable | Type | Recommend Usage |
33+
| -------- | ---- | --------------- |
34+
| data | Array(Double) | - |
35+
| percentValue | Double | Enter the percentage rate you want to calculate (If the data exceeds this value, overflow is prevented) |
36+
| colorData | Array(LinearGradient) | If you send an empty array, the default colors are used. (There are no restrictions on the array size) |
37+
| screenRatio | Double | The value dec 0 to 1 must be entered (Proportions the bar according to the screen width of the device)|
38+
| backgroundColor | Color | Sets the color of the bar on the back |
39+
40+
## Note
41+
It also includes a small touch animation :)

0 commit comments

Comments
 (0)