react-native-gifted-charts 1.4.29 → 1.4.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/LineChart/index.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,16 +52,16 @@ See the **[release changes by version here.](release-notes/release-notes.md)**
|
|
|
52
52
|
### React Native CLI
|
|
53
53
|
|
|
54
54
|
```sh
|
|
55
|
-
npm install react-native-gifted-charts
|
|
55
|
+
npm install react-native-gifted-charts react-native-linear-gradient react-native-svg
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Expo
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
|
-
npx expo install react-native-gifted-charts
|
|
61
|
+
npx expo install react-native-gifted-charts expo-linear-gradient react-native-svg
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Please note that `
|
|
64
|
+
Please note that `react-native-svg` and `react-native-linear-gradient`/`expo-linear-gradient` are needed for the library to work, so make sure they are installed in your project. <br />
|
|
65
65
|
**[gifted-charts-core](https://www.npmjs.com/package/gifted-charts-core)** contains the mathematical and logical utilities used by this library.
|
|
66
66
|
|
|
67
67
|
# Docs
|
package/dist/LineChart/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import { View, Animated, Easing, Text, Dimensions, I18nManager, } from 'react-na
|
|
|
40
40
|
import { styles } from './styles';
|
|
41
41
|
import { screenWidth, usePrevious } from '../utils';
|
|
42
42
|
import Svg, { Path, LinearGradient, Stop, Circle, Rect, Text as CanvasText, Line, ClipPath, Use, } from 'react-native-svg';
|
|
43
|
-
import { getSegmentedPathObjects, getRegionPathObjects, RANGE_ENTER, RANGE_EXIT, SEGMENT_END, SEGMENT_START, STOP, useLineChart, adjustToOffset, LineDefaults, } from 'gifted-charts-core';
|
|
43
|
+
import { getSegmentedPathObjects, getRegionPathObjects, RANGE_ENTER, RANGE_EXIT, SEGMENT_END, SEGMENT_START, STOP, useLineChart, adjustToOffset, LineDefaults, pointsWithPaddedRepititions, } from 'gifted-charts-core';
|
|
44
44
|
import BarAndLineChartsWrapper from '../Components/BarAndLineChartsWrapper';
|
|
45
45
|
import { StripAndLabel } from '../Components/common/StripAndLabel';
|
|
46
46
|
import { Pointer } from '../Components/common/Pointer';
|
|
@@ -65,13 +65,13 @@ export var LineChart = function (props) {
|
|
|
65
65
|
var animatedPath = animateOnDataChange && points && oldPoints
|
|
66
66
|
? animatedPoints.interpolate({
|
|
67
67
|
inputRange: [0, 1],
|
|
68
|
-
outputRange:
|
|
68
|
+
outputRange: pointsWithPaddedRepititions(oldPoints, points),
|
|
69
69
|
})
|
|
70
70
|
: '';
|
|
71
71
|
var animatedFillPath = animateOnDataChange && fillPoints && oldFillPoints
|
|
72
72
|
? animatedFillPoints.interpolate({
|
|
73
73
|
inputRange: [0, 1],
|
|
74
|
-
outputRange:
|
|
74
|
+
outputRange: pointsWithPaddedRepititions(oldFillPoints, fillPoints),
|
|
75
75
|
})
|
|
76
76
|
: '';
|
|
77
77
|
useEffect(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-gifted-charts",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.30",
|
|
4
4
|
"description": "The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"registry": "https://registry.npmjs.org/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"gifted-charts-core": "^0.1.
|
|
28
|
+
"gifted-charts-core": "^0.1.31"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/cli": "^7.24.8",
|