react-native-gifted-charts 1.4.62 → 1.4.63
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 +1 -1
- package/dist/BarChart/index.js +3 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<a href="https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts">
|
|
11
11
|
<img src="/demos/gitLogo.png" height="auto" width="28" height="28" />
|
|
12
12
|
</a>
|
|
13
|
-
<a href="https://stackoverflow.com/questions/tagged/react-native-gifted-charts">
|
|
13
|
+
<a href="https://stackoverflow.com/questions/tagged/react-native-gifted-charts?tab=Newest">
|
|
14
14
|
<img src="/demos/stackOverflow.png" height="auto" width="28" height="28" />
|
|
15
15
|
</a>
|
|
16
16
|
<a href="https://discord.gg/FBbu9duJxs">
|
package/dist/BarChart/index.js
CHANGED
|
@@ -133,9 +133,10 @@ export var BarChart = function (props) {
|
|
|
133
133
|
};
|
|
134
134
|
var activatePointer = function (x) {
|
|
135
135
|
var _a;
|
|
136
|
+
var chartData = stackData !== null && stackData !== void 0 ? stackData : data;
|
|
136
137
|
var factor = (x - initialSpacing - barWidth / 2) / (spacing + barWidth);
|
|
137
138
|
factor = Math.round(factor);
|
|
138
|
-
factor = Math.min(factor,
|
|
139
|
+
factor = Math.min(factor, chartData.length - 1);
|
|
139
140
|
factor = Math.max(factor, 0);
|
|
140
141
|
var z = initialSpacing +
|
|
141
142
|
(spacing + barWidth) * factor -
|
|
@@ -144,7 +145,7 @@ export var BarChart = function (props) {
|
|
|
144
145
|
setPointerX(z);
|
|
145
146
|
setPointerIndex(factor);
|
|
146
147
|
var item, y;
|
|
147
|
-
item =
|
|
148
|
+
item = chartData[factor];
|
|
148
149
|
var stackSum = 0;
|
|
149
150
|
if ('stacks' in item) {
|
|
150
151
|
stackSum = item.stacks.reduce(function (acc, stack) { var _a; return acc + ((_a = stack.value) !== null && _a !== void 0 ? _a : 0); }, 0);
|
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.63",
|
|
4
4
|
"description": "The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar, Population Pyramid and Radar charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"registry": "https://registry.npmjs.org/"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"gifted-charts-core": "0.1.
|
|
29
|
+
"gifted-charts-core": "0.1.65"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/cli": "^7.24.8",
|