react-native-gifted-charts 1.4.39 → 1.4.41
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.
|
@@ -56,9 +56,13 @@ var RenderBars = function (props) {
|
|
|
56
56
|
? -40
|
|
57
57
|
: -6 -
|
|
58
58
|
xAxisTextNumberOfLines * 18 -
|
|
59
|
-
|
|
59
|
+
(value < 0
|
|
60
|
+
? -xAxisLabelsVerticalShift
|
|
61
|
+
: xAxisLabelsVerticalShift)) -
|
|
60
62
|
barMarginBottom -
|
|
61
|
-
|
|
63
|
+
(value < 0 && !autoShiftLabels
|
|
64
|
+
? -labelsDistanceFromXaxis
|
|
65
|
+
: labelsDistanceFromXaxis),
|
|
62
66
|
},
|
|
63
67
|
rotateLabel
|
|
64
68
|
? horizontal
|
|
@@ -79,7 +83,7 @@ var RenderBars = function (props) {
|
|
|
79
83
|
{
|
|
80
84
|
translateY: autoShiftLabels
|
|
81
85
|
? 0
|
|
82
|
-
: 16.5 * xAxisTextNumberOfLines +
|
|
86
|
+
: 16.5 * xAxisTextNumberOfLines + 12,
|
|
83
87
|
},
|
|
84
88
|
],
|
|
85
89
|
}
|
|
@@ -104,7 +108,10 @@ var RenderBars = function (props) {
|
|
|
104
108
|
barWidth) + spacing,
|
|
105
109
|
left: spacing / -2,
|
|
106
110
|
position: 'absolute',
|
|
107
|
-
height: (_a = props.xAxisLabelsHeight) !== null && _a !== void 0 ? _a : xAxisTextNumberOfLines * 18
|
|
111
|
+
height: (_a = props.xAxisLabelsHeight) !== null && _a !== void 0 ? _a : xAxisTextNumberOfLines * 18 -
|
|
112
|
+
(value < 0
|
|
113
|
+
? -xAxisLabelsVerticalShift
|
|
114
|
+
: xAxisLabelsVerticalShift),
|
|
108
115
|
bottom: top
|
|
109
116
|
? (containerHeight || 200) +
|
|
110
117
|
((_b = secondaryXAxis === null || secondaryXAxis === void 0 ? void 0 : secondaryXAxis.labelsDistanceFromXaxis) !== null && _b !== void 0 ? _b : 15)
|
|
@@ -129,7 +136,7 @@ var RenderBars = function (props) {
|
|
|
129
136
|
{
|
|
130
137
|
translateY: autoShiftLabels
|
|
131
138
|
? 0
|
|
132
|
-
: 16.5 * xAxisTextNumberOfLines +
|
|
139
|
+
: 16.5 * xAxisTextNumberOfLines + 12,
|
|
133
140
|
},
|
|
134
141
|
],
|
|
135
142
|
}
|
package/dist/BarChart/index.js
CHANGED
|
@@ -112,7 +112,7 @@ export var BarChart = function (props) {
|
|
|
112
112
|
var contentContainerStyle = {
|
|
113
113
|
position: 'absolute',
|
|
114
114
|
height: containerHeightIncludingBelowXAxis,
|
|
115
|
-
bottom: 60,
|
|
115
|
+
bottom: 60 + labelsExtraHeight,
|
|
116
116
|
paddingLeft: initialSpacing,
|
|
117
117
|
width: totalWidth,
|
|
118
118
|
flexDirection: 'row',
|
|
@@ -201,12 +201,12 @@ export var BarChart = function (props) {
|
|
|
201
201
|
}, onResponderTerminationRequest: function (evt) { return false; }, style: contentContainerStyle, children: [pointerX > 0 && stripBehindBars ? (_jsx(View, { pointerEvents: pointerEvents !== null && pointerEvents !== void 0 ? pointerEvents : 'none', style: {
|
|
202
202
|
position: 'absolute',
|
|
203
203
|
height: extendedContainerHeight + noOfSectionsBelowXAxis * stepHeight,
|
|
204
|
-
bottom: xAxisLabelsVerticalShift
|
|
204
|
+
bottom: xAxisLabelsVerticalShift,
|
|
205
205
|
width: totalWidth,
|
|
206
206
|
}, children: renderStripAndLabel(null) })) : null, renderChart(), pointerX > 0 ? (_jsxs(View, { pointerEvents: pointerEvents !== null && pointerEvents !== void 0 ? pointerEvents : 'none', style: {
|
|
207
207
|
position: 'absolute',
|
|
208
208
|
height: extendedContainerHeight + noOfSectionsBelowXAxis * stepHeight,
|
|
209
|
-
bottom: xAxisLabelsVerticalShift
|
|
209
|
+
bottom: xAxisLabelsVerticalShift,
|
|
210
210
|
width: totalWidth,
|
|
211
211
|
zIndex: 20,
|
|
212
212
|
}, children: [!stripOverPointer &&
|
|
@@ -37,7 +37,9 @@ var BarAndLineChartsWrapper = function (props) {
|
|
|
37
37
|
50 -
|
|
38
38
|
overflowTop,
|
|
39
39
|
marginTop: trimYAxisAtTop ? containerHeight / 20 : 0,
|
|
40
|
-
marginBottom: (xAxisLabelsHeight !== null && xAxisLabelsHeight !== void 0 ? xAxisLabelsHeight : xAxisTextNumberOfLines * 18) -
|
|
40
|
+
marginBottom: (xAxisLabelsHeight !== null && xAxisLabelsHeight !== void 0 ? xAxisLabelsHeight : xAxisTextNumberOfLines * 18) -
|
|
41
|
+
55 -
|
|
42
|
+
xAxisLabelsVerticalShift, //This is to not let the Things that should be rendered below the chart overlap with it
|
|
41
43
|
},
|
|
42
44
|
});
|
|
43
45
|
return (_jsxs(View, { style: [
|
package/dist/LineChart/index.js
CHANGED
|
@@ -912,7 +912,18 @@ export var LineChart = function (props) {
|
|
|
912
912
|
? renderAnimatedLabel(true, index, secondaryLabel, secondaryLabelTextStyle, item.secondaryLabelComponent)
|
|
913
913
|
: renderLabel(true, index, secondaryLabel, secondaryLabelTextStyle, item.secondaryLabelComponent)
|
|
914
914
|
: null] }, index));
|
|
915
|
-
})
|
|
915
|
+
}), (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.dynamicLegendComponent) && pointerX > 0 ? (_jsx(View, { style: [
|
|
916
|
+
{ position: 'absolute' },
|
|
917
|
+
pointerConfig.dynamicLegendContainerStyle,
|
|
918
|
+
], children: pointerConfig.dynamicLegendComponent(dataSet
|
|
919
|
+
? pointerItemsForSet
|
|
920
|
+
: [
|
|
921
|
+
pointerItem,
|
|
922
|
+
pointerItem2,
|
|
923
|
+
pointerItem3,
|
|
924
|
+
pointerItem4,
|
|
925
|
+
pointerItem5,
|
|
926
|
+
].filter(function (item) { return !!item; }), pointerIndex) })) : null] }));
|
|
916
927
|
};
|
|
917
928
|
return (_jsx(BarAndLineChartsWrapper, __assign({}, barAndLineChartsWrapperProps, { dataSet: props.dataSet, scrollRef: scrollRef, animatedWidth: widthValue, renderChartContent: renderChartContent, remainingScrollViewProps: remainingScrollViewProps })));
|
|
918
929
|
};
|
package/dist/PieChart/main.js
CHANGED
|
@@ -10,12 +10,11 @@ export var PieChartMain = function (props) {
|
|
|
10
10
|
var prevLabelComponentX = 0;
|
|
11
11
|
var wasFirstItemOnPole = false;
|
|
12
12
|
var onPressHandler = function (e) {
|
|
13
|
-
var rad = radius;
|
|
14
13
|
var _a = e.nativeEvent, x = _a.locationX, y = _a.locationY;
|
|
15
14
|
x -= extraRadius;
|
|
16
15
|
y -= extraRadius;
|
|
17
16
|
var r = Math.sqrt(Math.pow((x - cx), 2) + Math.pow((y - cy), 2));
|
|
18
|
-
if (r >
|
|
17
|
+
if (r > radius)
|
|
19
18
|
return;
|
|
20
19
|
var a = Math.atan2(y - cy, x - cx);
|
|
21
20
|
for (var index = 0; index < data.length; index++) {
|
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.41",
|
|
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.41"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/cli": "^7.24.8",
|