react-native-gifted-charts 1.4.65 → 1.4.66
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.
|
@@ -160,7 +160,9 @@ var RenderBars = function (props) {
|
|
|
160
160
|
{
|
|
161
161
|
translateY: (containerHeight || 200) -
|
|
162
162
|
(barHeight - 10 + xAxisLabelsVerticalShift) +
|
|
163
|
-
(item.value < 0
|
|
163
|
+
(item.value < 0
|
|
164
|
+
? Math.max(minHeight, Math.abs(item.value) * heightFactor)
|
|
165
|
+
: 0),
|
|
164
166
|
},
|
|
165
167
|
{ rotateZ: item.value < 0 ? '180deg' : '0deg' },
|
|
166
168
|
],
|
package/dist/BarChart/index.js
CHANGED
|
@@ -220,7 +220,7 @@ export var BarChart = function (props) {
|
|
|
220
220
|
] })) : null] }));
|
|
221
221
|
}
|
|
222
222
|
else {
|
|
223
|
-
return (
|
|
223
|
+
return (_jsxs(Pressable, { style: contentContainerStyle, onPress: function () {
|
|
224
224
|
var _a, _b;
|
|
225
225
|
if (props.highlightEnabled && !((_a = selectedIndex.includes) === null || _a === void 0 ? void 0 : _a.call(selectedIndex, -1)))
|
|
226
226
|
setSelectedIndex([-1]);
|
|
@@ -229,7 +229,11 @@ export var BarChart = function (props) {
|
|
|
229
229
|
// props.setHighlightedStackIndex?.(-1)
|
|
230
230
|
}
|
|
231
231
|
(_b = props.onBackgroundPress) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
232
|
-
}, children: renderChart()
|
|
232
|
+
}, children: [renderChart(),
|
|
233
|
+
// Only For Bar Charts-
|
|
234
|
+
showLine ? _jsx(RenderLineInBarChart, __assign({}, lineInBarChartProps)) : null,
|
|
235
|
+
// Only For Bar Charts-
|
|
236
|
+
showLine && (points2 === null || points2 === void 0 ? void 0 : points2.length) ? (_jsx(RenderLineInBarChart, __assign({}, lineInBarChartProps2))) : null] }));
|
|
233
237
|
}
|
|
234
238
|
};
|
|
235
239
|
var renderChart = function () {
|
package/dist/RadarChart/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Animated, View } from 'react-native';
|
|
|
4
4
|
import Svg, { Line, Polygon, Circle, Text as SvgText, Defs, RadialGradient, Stop, TSpan, } from 'react-native-svg';
|
|
5
5
|
import { useRadarChart } from 'gifted-charts-core';
|
|
6
6
|
export var RadarChart = function (props) {
|
|
7
|
-
var _a = useRadarChart(props), data = _a.data, dataSet = _a.dataSet, center = _a.center, radius = _a.radius, chartSize = _a.chartSize, polarToCartesian = _a.polarToCartesian, labels = _a.labels, labelConfigArray = _a.labelConfigArray, labelsPositionOffset = _a.labelsPositionOffset, dataLabelsConfigArray = _a.dataLabelsConfigArray, maxValue = _a.maxValue, dataLabels = _a.dataLabels, dataLabelsArray = _a.dataLabelsArray, gridSections = _a.gridSections, gridFill = _a.gridFill, fontSize = _a.fontSize, stroke = _a.stroke, textAnchor = _a.textAnchor, alignmentBaseline = _a.alignmentBaseline, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, dataLabelsPositionOffset = _a.dataLabelsPositionOffset, polygonStroke = _a.polygonStroke, polygonStrokeWidth = _a.polygonStrokeWidth, polygonStrokeDashArray = _a.polygonStrokeDashArray, polygonFill = _a.polygonFill, polygonGradientColor = _a.polygonGradientColor, polygonShowGradient = _a.polygonShowGradient, polygonOpacity = _a.polygonOpacity, polygonGradientOpacity = _a.polygonGradientOpacity, polygonIsAnimated = _a.polygonIsAnimated, polygonAnimationDuration = _a.polygonAnimationDuration, asterLinesStroke = _a.asterLinesStroke, asterLinesStrokeWidth = _a.asterLinesStrokeWidth, asterLinesStrokeDashArray = _a.asterLinesStrokeDashArray, polygonPoints = _a.polygonPoints, initialPolygonPoints = _a.initialPolygonPoints, polygonPointsArray = _a.polygonPointsArray, initialPolygonPointsArray = _a.initialPolygonPointsArray, polygonConfigArray = _a.polygonConfigArray, angleStep = _a.angleStep, circular = _a.circular, hideGrid = _a.hideGrid, hideLabels = _a.hideLabels, hideAsterLines = _a.hideAsterLines, getGridLevelProps = _a.getGridLevelProps, animateTogether = _a.animateTogether;
|
|
7
|
+
var _a = useRadarChart(props), data = _a.data, dataSet = _a.dataSet, center = _a.center, radius = _a.radius, chartSize = _a.chartSize, polarToCartesian = _a.polarToCartesian, labels = _a.labels, labelConfigArray = _a.labelConfigArray, labelsPositionOffset = _a.labelsPositionOffset, dataLabelsConfigArray = _a.dataLabelsConfigArray, maxValue = _a.maxValue, dataLabels = _a.dataLabels, dataLabelsArray = _a.dataLabelsArray, gridSections = _a.gridSections, gridFill = _a.gridFill, fontSize = _a.fontSize, stroke = _a.stroke, textAnchor = _a.textAnchor, alignmentBaseline = _a.alignmentBaseline, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, dataLabelsPositionOffset = _a.dataLabelsPositionOffset, polygonStroke = _a.polygonStroke, polygonStrokeWidth = _a.polygonStrokeWidth, polygonStrokeDashArray = _a.polygonStrokeDashArray, polygonFill = _a.polygonFill, polygonGradientColor = _a.polygonGradientColor, polygonShowGradient = _a.polygonShowGradient, polygonOpacity = _a.polygonOpacity, polygonGradientOpacity = _a.polygonGradientOpacity, polygonIsAnimated = _a.polygonIsAnimated, polygonAnimationDuration = _a.polygonAnimationDuration, asterLinesStroke = _a.asterLinesStroke, asterLinesStrokeWidth = _a.asterLinesStrokeWidth, asterLinesStrokeDashArray = _a.asterLinesStrokeDashArray, polygonPoints = _a.polygonPoints, initialPolygonPoints = _a.initialPolygonPoints, polygonPointsArray = _a.polygonPointsArray, initialPolygonPointsArray = _a.initialPolygonPointsArray, polygonConfigArray = _a.polygonConfigArray, angleStep = _a.angleStep, circular = _a.circular, hideGrid = _a.hideGrid, hideLabels = _a.hideLabels, hideAsterLines = _a.hideAsterLines, getGridLevelProps = _a.getGridLevelProps, animateTogether = _a.animateTogether, startAngle = _a.startAngle;
|
|
8
8
|
var initialPolygonPointsAr = initialPolygonPoints.split(' ');
|
|
9
9
|
var finalPolygonPointsAr = polygonPoints.split(' ');
|
|
10
10
|
var AnimatedPolygon = Animated.createAnimatedComponent(Polygon);
|
|
@@ -93,14 +93,14 @@ export var RadarChart = function (props) {
|
|
|
93
93
|
}) })) : null, hideAsterLines
|
|
94
94
|
? null
|
|
95
95
|
: labels.map(function (_, index) {
|
|
96
|
-
var angle = index * angleStep;
|
|
96
|
+
var angle = index * angleStep + startAngle;
|
|
97
97
|
var _a = polarToCartesian(angle, maxValue), x = _a.x, y = _a.y;
|
|
98
98
|
return (_jsx(Line, { x1: center, y1: center, x2: x, y2: y, stroke: asterLinesStroke, strokeWidth: asterLinesStrokeWidth, strokeDasharray: asterLinesStrokeDashArray }, "axis-".concat(index)));
|
|
99
99
|
}), hideLabels
|
|
100
100
|
? null
|
|
101
101
|
: labels.map(function (category, index) {
|
|
102
102
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
103
|
-
var angle = index * angleStep;
|
|
103
|
+
var angle = index * angleStep + startAngle;
|
|
104
104
|
var _q = polarToCartesian(angle, maxValue + labelsPositionOffset), x = _q.x, y = _q.y; // Offset for label position
|
|
105
105
|
var fontSizeLocal = (_b = (_a = labelConfigArray === null || labelConfigArray === void 0 ? void 0 : labelConfigArray[index]) === null || _a === void 0 ? void 0 : _a.fontSize) !== null && _b !== void 0 ? _b : fontSize;
|
|
106
106
|
var fontWeightLocal = (_d = (_c = labelConfigArray === null || labelConfigArray === void 0 ? void 0 : labelConfigArray[index]) === null || _c === void 0 ? void 0 : _c.fontWeight) !== null && _d !== void 0 ? _d : fontWeight;
|
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.66",
|
|
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.68"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/cli": "^7.24.8",
|