Skip to content

Commit 907fe25

Browse files
authored
Merge pull request #10 from aljadan/main
feat: add activeLineIndex prop
2 parents 93c3574 + 1222de4 commit 907fe25

11 files changed

Lines changed: 81 additions & 54 deletions

File tree

docs/interfaces/ActivePointConfig.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ false
2424

2525
#### Defined in
2626

27-
[src/types.ts:215](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L215)
27+
[src/types.ts:220](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L220)
2828

2929
***
3030

@@ -42,7 +42,7 @@ the border color for the active point circle
4242

4343
#### Defined in
4444

45-
[src/types.ts:170](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L170)
45+
[src/types.ts:175](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L175)
4646

4747
***
4848

@@ -60,7 +60,7 @@ the border width for the active point circle
6060

6161
#### Defined in
6262

63-
[src/types.ts:175](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L175)
63+
[src/types.ts:180](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L180)
6464

6565
***
6666

@@ -78,7 +78,7 @@ The color of the active point circle
7878

7979
#### Defined in
8080

81-
[src/types.ts:165](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L165)
81+
[src/types.ts:170](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L170)
8282

8383
***
8484

@@ -96,7 +96,7 @@ the border radius for the active point circle
9696

9797
#### Defined in
9898

99-
[src/types.ts:180](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L180)
99+
[src/types.ts:185](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L185)
100100

101101
***
102102

@@ -114,7 +114,7 @@ true
114114

115115
#### Defined in
116116

117-
[src/types.ts:190](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L190)
117+
[src/types.ts:195](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L195)
118118

119119
***
120120

@@ -132,7 +132,7 @@ false
132132

133133
#### Defined in
134134

135-
[src/types.ts:185](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L185)
135+
[src/types.ts:190](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L190)
136136

137137
***
138138

@@ -150,7 +150,7 @@ The color of the vertical line
150150

151151
#### Defined in
152152

153-
[src/types.ts:195](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L195)
153+
[src/types.ts:200](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L200)
154154

155155
***
156156

@@ -168,7 +168,7 @@ The dash array for the vertical line (this will create a dashed line)
168168

169169
#### Defined in
170170

171-
[src/types.ts:210](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L210)
171+
[src/types.ts:215](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L215)
172172

173173
***
174174

@@ -186,7 +186,7 @@ The opacity of the vertical line (number between 0 and 1)
186186

187187
#### Defined in
188188

189-
[src/types.ts:200](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L200)
189+
[src/types.ts:205](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L205)
190190

191191
***
192192

@@ -204,4 +204,4 @@ The width of the vertical line
204204

205205
#### Defined in
206206

207-
[src/types.ts:205](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L205)
207+
[src/types.ts:210](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L210)

docs/interfaces/AnimationConfig.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Animation presets
2727

2828
#### Defined in
2929

30-
[src/types.ts:283](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L283)
30+
[src/types.ts:288](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L288)
3131

3232
***
3333

@@ -45,4 +45,4 @@ Animation Duration
4545

4646
#### Defined in
4747

48-
[src/types.ts:278](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L278)
48+
[src/types.ts:283](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L283)

docs/interfaces/EndPointConfig.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Weather the end point should be animated (pulse animation)
1818

1919
#### Defined in
2020

21-
[src/types.ts:154](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L154)
21+
[src/types.ts:159](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L159)
2222

2323
***
2424

@@ -30,7 +30,7 @@ The color of the end point
3030

3131
#### Defined in
3232

33-
[src/types.ts:146](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L146)
33+
[src/types.ts:151](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L151)
3434

3535
***
3636

@@ -42,4 +42,4 @@ The border radius of the end point
4242

4343
#### Defined in
4444

45-
[src/types.ts:150](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L150)
45+
[src/types.ts:155](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L155)

docs/interfaces/ExtraConfig.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Supplying activeOffsetX for the gesture handler, if the offset is reached, the s
2424

2525
#### Defined in
2626

27-
[src/types.ts:247](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L247)
27+
[src/types.ts:252](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L252)
2828

2929
***
3030

@@ -42,7 +42,7 @@ false
4242

4343
#### Defined in
4444

45-
[src/types.ts:226](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L226)
45+
[src/types.ts:231](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L231)
4646

4747
***
4848

@@ -54,7 +54,7 @@ Settings this to true will make the chart y axis start from zero even if the min
5454

5555
#### Defined in
5656

57-
[src/types.ts:238](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L238)
57+
[src/types.ts:243](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L243)
5858

5959
***
6060

@@ -66,7 +66,7 @@ Animation configuration
6666

6767
#### Defined in
6868

69-
[src/types.ts:264](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L264)
69+
[src/types.ts:269](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L269)
7070

7171
***
7272

@@ -78,7 +78,7 @@ supplying this function will allow you to customize the x axis min and max value
7878

7979
#### Defined in
8080

81-
[src/types.ts:260](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L260)
81+
[src/types.ts:265](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L265)
8282

8383
***
8484

@@ -90,7 +90,7 @@ supplying this function will allow you to customize the y axis min and max value
9090

9191
#### Defined in
9292

93-
[src/types.ts:256](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L256)
93+
[src/types.ts:261](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L261)
9494

9595
***
9696

@@ -108,7 +108,7 @@ Space between the end of the chart the the end of the view (like paddingEnd)
108108

109109
#### Defined in
110110

111-
[src/types.ts:252](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L252)
111+
[src/types.ts:257](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L257)
112112

113113
***
114114

@@ -120,7 +120,7 @@ Settings this to true will make the active point always visible after the user t
120120

121121
#### Defined in
122122

123-
[src/types.ts:234](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L234)
123+
[src/types.ts:239](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L239)
124124

125125
***
126126

@@ -132,7 +132,7 @@ This is the index of the initial active point (the point that will be active whe
132132

133133
#### Defined in
134134

135-
[src/types.ts:230](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L230)
135+
[src/types.ts:235](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L235)
136136

137137
***
138138

@@ -144,4 +144,4 @@ Supplying simultaneousHandlers will make the chart work with other gesture handl
144144

145145
#### Defined in
146146

147-
[src/types.ts:242](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L242)
147+
[src/types.ts:247](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L247)

docs/interfaces/Line.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The component to render when the user taps on the chart
1818

1919
#### Defined in
2020

21-
[src/types.ts:86](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L86)
21+
[src/types.ts:91](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L91)
2222

2323
***
2424

@@ -30,7 +30,7 @@ The same as (activePointComponent) but the component will receive the shared val
3030

3131
#### Defined in
3232

33-
[src/types.ts:90](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L90)
33+
[src/types.ts:95](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L95)
3434

3535
***
3636

@@ -42,7 +42,7 @@ The configuration for the active point (the point that is shown when the user ta
4242

4343
#### Defined in
4444

45-
[src/types.ts:62](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L62)
45+
[src/types.ts:67](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L67)
4646

4747
***
4848

@@ -60,7 +60,7 @@ The curve of the line
6060

6161
#### Defined in
6262

63-
[src/types.ts:103](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L103)
63+
[src/types.ts:108](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L108)
6464

6565
***
6666

@@ -72,7 +72,7 @@ The data points for the line containing an array of objects with x and y values
7272

7373
#### Defined in
7474

75-
[src/types.ts:58](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L58)
75+
[src/types.ts:63](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L63)
7676

7777
***
7878

@@ -84,7 +84,7 @@ The end point configuration (the point appearing at the end of the line)
8484

8585
#### Defined in
8686

87-
[src/types.ts:98](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L98)
87+
[src/types.ts:103](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L103)
8888

8989
***
9090

@@ -102,7 +102,7 @@ The fill opacity of the area chart
102102

103103
#### Defined in
104104

105-
[src/types.ts:113](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L113)
105+
[src/types.ts:118](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L118)
106106

107107
***
108108

@@ -120,7 +120,7 @@ false
120120

121121
#### Defined in
122122

123-
[src/types.ts:108](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L108)
123+
[src/types.ts:113](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L113)
124124

125125
***
126126

@@ -132,7 +132,7 @@ Optional key to indicate that the line has changed (helps with triggering animat
132132

133133
#### Defined in
134134

135-
[src/types.ts:54](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L54)
135+
[src/types.ts:59](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L59)
136136

137137
***
138138

@@ -150,7 +150,7 @@ the opacity of the begging of the line (gives it gradient effect if you have col
150150

151151
#### Defined in
152152

153-
[src/types.ts:71](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L71)
153+
[src/types.ts:76](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L76)
154154

155155
***
156156

@@ -162,7 +162,7 @@ The color of the line (supplying an array of colors will create a linear gradien
162162

163163
#### Defined in
164164

165-
[src/types.ts:66](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L66)
165+
[src/types.ts:71](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L71)
166166

167167
***
168168

@@ -174,7 +174,7 @@ The width of the line
174174

175175
#### Defined in
176176

177-
[src/types.ts:94](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L94)
177+
[src/types.ts:99](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L99)
178178

179179
***
180180

@@ -186,7 +186,7 @@ specify the strokeDasharray for the line
186186

187187
#### Defined in
188188

189-
[src/types.ts:82](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L82)
189+
[src/types.ts:87](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L87)
190190

191191
***
192192

@@ -204,4 +204,4 @@ the opacity of the end of the line (gives it gradient effect if you have colored
204204

205205
#### Defined in
206206

207-
[src/types.ts:76](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L76)
207+
[src/types.ts:81](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L81)

docs/type-aliases/LineChart.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ The props for the LineChart component
1212

1313
## Type declaration
1414

15+
### activeLineIndex?
16+
17+
> `optional` **activeLineIndex**: `number`
18+
19+
The index of the line that will trigger point event callbacks when user interacts with the chart
20+
21+
#### Default
22+
23+
```ts
24+
0
25+
```
26+
1527
### activePointSharedValue?
1628

1729
> `optional` **activePointSharedValue**: `DataPointSharedValue`
@@ -78,4 +90,4 @@ The width of the chart (default value is the width of the screen)
7890

7991
## Defined in
8092

81-
[src/types.ts:9](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/09edd766afceda200551558c41bf04eef4ec5b23/src/types.ts#L9)
93+
[src/types.ts:9](https://github.com/Malaa-tech/react-native-simple-line-chart/blob/6e0215dbd194df10ddb3d5a2a472fbe3c71a004f/src/types.ts#L9)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-simple-line-chart",
3-
"version": "0.36.2",
3+
"version": "0.37.0",
44
"description": "A fast, interactive, animated and simple line chart component for React Native",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)