react-native-gifted-charts 1.4.24 → 1.4.26
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Pointer: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const Pointer: (props: any) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,6 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
export var Pointer = function (props) {
|
|
4
4
|
var pointerX = props.pointerX, pointerYLocal = props.pointerYLocal, pointerComponent = props.pointerComponent, pointerHeight = props.pointerHeight, pointerRadius = props.pointerRadius, pointerWidth = props.pointerWidth, pointerItemLocal = props.pointerItemLocal, pointerColorLocal = props.pointerColorLocal;
|
|
5
|
+
if (isNaN(pointerYLocal) || typeof pointerYLocal !== 'number')
|
|
6
|
+
return null;
|
|
5
7
|
return (_jsx(View, { style: {
|
|
6
8
|
position: 'absolute',
|
|
7
9
|
left: pointerX + (pointerX.pointerShiftX || 0),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StripAndLabelProps } from 'gifted-charts-core';
|
|
2
|
-
export declare const StripAndLabel: (props: StripAndLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const StripAndLabel: (props: StripAndLabelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -4,8 +4,10 @@ import Svg, { Line } from 'react-native-svg';
|
|
|
4
4
|
import { getTopAndLeftForStripAndLabel, } from 'gifted-charts-core';
|
|
5
5
|
export var StripAndLabel = function (props) {
|
|
6
6
|
var _a;
|
|
7
|
-
var pointerX = props.pointerX, pointerLabelWidth = props.pointerLabelWidth, pointerRadius = props.pointerRadius, pointerWidth = props.pointerWidth, pointerYLocal = props.pointerYLocal, pointerStripUptoDataPoint = props.pointerStripUptoDataPoint, pointerStripHeight = props.pointerStripHeight, pointerItemLocal = props.pointerItemLocal, showPointerStrip = props.showPointerStrip, pointerStripWidth = props.pointerStripWidth, containerHeight = props.containerHeight, xAxisThickness = props.xAxisThickness, pointerStripColor = props.pointerStripColor, pointerConfig = props.pointerConfig, pointerLabelComponent = props.pointerLabelComponent, secondaryPointerItem = props.secondaryPointerItem, pointerEvents = props.pointerEvents, isBarChart = props.isBarChart, pointerIndex = props.pointerIndex;
|
|
7
|
+
var pointerX = props.pointerX, pointerLabelWidth = props.pointerLabelWidth, pointerRadius = props.pointerRadius, pointerWidth = props.pointerWidth, pointerYLocal = props.pointerYLocal, pointerStripUptoDataPoint = props.pointerStripUptoDataPoint, pointerStripHeight = props.pointerStripHeight, pointerItemLocal = props.pointerItemLocal, showPointerStrip = props.showPointerStrip, pointerStripWidth = props.pointerStripWidth, containerHeight = props.containerHeight, xAxisThickness = props.xAxisThickness, pointerStripColor = props.pointerStripColor, pointerConfig = props.pointerConfig, pointerLabelComponent = props.pointerLabelComponent, secondaryPointerItem = props.secondaryPointerItem, pointerItemsForSet = props.pointerItemsForSet, secondaryPointerItemsForSet = props.secondaryPointerItemsForSet, pointerEvents = props.pointerEvents, isBarChart = props.isBarChart, pointerIndex = props.pointerIndex, hasDataSet = props.hasDataSet;
|
|
8
8
|
var _b = getTopAndLeftForStripAndLabel(props), top = _b.top, left = _b.left;
|
|
9
|
+
if (isNaN(top) || typeof top !== 'number')
|
|
10
|
+
return null;
|
|
9
11
|
return (_jsxs(View, { style: {
|
|
10
12
|
position: 'absolute',
|
|
11
13
|
left: pointerX + (((_a = pointerItemLocal[0]) === null || _a === void 0 ? void 0 : _a.pointerShiftX) || 0),
|
|
@@ -39,5 +41,5 @@ export var StripAndLabel = function (props) {
|
|
|
39
41
|
: containerHeight - pointerStripHeight,
|
|
40
42
|
width: pointerLabelWidth,
|
|
41
43
|
},
|
|
42
|
-
], children: pointerLabelComponent === null || pointerLabelComponent === void 0 ? void 0 : pointerLabelComponent(pointerItemLocal, secondaryPointerItem, pointerIndex) })) : null] }));
|
|
44
|
+
], children: pointerLabelComponent === null || pointerLabelComponent === void 0 ? void 0 : pointerLabelComponent(hasDataSet ? pointerItemsForSet : pointerItemLocal, hasDataSet ? secondaryPointerItemsForSet : [secondaryPointerItem], pointerIndex) })) : null] }));
|
|
43
45
|
};
|
package/dist/LineChart/index.js
CHANGED
|
@@ -39,14 +39,14 @@ import { Fragment, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
|
39
39
|
import { View, Animated, Easing, Text, Dimensions, I18nManager, } from 'react-native';
|
|
40
40
|
import { styles } from './styles';
|
|
41
41
|
import { screenWidth, usePrevious } from '../utils';
|
|
42
|
-
import Svg, { Path, LinearGradient, Stop, Circle, Rect, Text as CanvasText, Line, } from 'react-native-svg';
|
|
42
|
+
import Svg, { Path, LinearGradient, Stop, Circle, Rect, Text as CanvasText, Line, ClipPath, Use, } from 'react-native-svg';
|
|
43
43
|
import { getSegmentedPathObjects, getRegionPathObjects, RANGE_ENTER, RANGE_EXIT, SEGMENT_END, SEGMENT_START, STOP, useLineChart, adjustToOffset, LineDefaults, } 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';
|
|
47
47
|
var AnimatedPath = Animated.createAnimatedComponent(Path);
|
|
48
48
|
export var LineChart = function (props) {
|
|
49
|
-
var _a, _b;
|
|
49
|
+
var _a, _b, _c, _d;
|
|
50
50
|
var scrollRef = (_a = props.scrollRef) !== null && _a !== void 0 ? _a : useRef(null);
|
|
51
51
|
var opacityValue = useMemo(function () { return new Animated.Value(0); }, []);
|
|
52
52
|
var heightValue = useMemo(function () { return new Animated.Value(0); }, []);
|
|
@@ -55,8 +55,8 @@ export var LineChart = function (props) {
|
|
|
55
55
|
var widthValue3 = useMemo(function () { return new Animated.Value(0); }, []);
|
|
56
56
|
var widthValue4 = useMemo(function () { return new Animated.Value(0); }, []);
|
|
57
57
|
var widthValue5 = useMemo(function () { return new Animated.Value(0); }, []);
|
|
58
|
-
var
|
|
59
|
-
var secondaryXAxis = props.secondaryXAxis;
|
|
58
|
+
var _e = useLineChart(__assign(__assign({}, props), { parentWidth: (_b = props.parentWidth) !== null && _b !== void 0 ? _b : screenWidth })), scrollX = _e.scrollX, setScrollX = _e.setScrollX, arrow1Points = _e.arrow1Points, arrow2Points = _e.arrow2Points, arrow3Points = _e.arrow3Points, arrow4Points = _e.arrow4Points, arrow5Points = _e.arrow5Points, secondaryArrowPoints = _e.secondaryArrowPoints, pointerIndex = _e.pointerIndex, setPointerIndex = _e.setPointerIndex, pointerX = _e.pointerX, setPointerX = _e.setPointerX, pointerY = _e.pointerY, setPointerY = _e.setPointerY, pointerItem = _e.pointerItem, setPointerItem = _e.setPointerItem, pointerY2 = _e.pointerY2, setPointerY2 = _e.setPointerY2, pointerItem2 = _e.pointerItem2, setPointerItem2 = _e.setPointerItem2, pointerY3 = _e.pointerY3, setPointerY3 = _e.setPointerY3, pointerItem3 = _e.pointerItem3, setPointerItem3 = _e.setPointerItem3, pointerY4 = _e.pointerY4, setPointerY4 = _e.setPointerY4, pointerItem4 = _e.pointerItem4, setPointerItem4 = _e.setPointerItem4, pointerY5 = _e.pointerY5, setPointerY5 = _e.setPointerY5, pointerYsForDataSet = _e.pointerYsForDataSet, setPointerYsForDataSet = _e.setPointerYsForDataSet, pointerItem5 = _e.pointerItem5, setPointerItem5 = _e.setPointerItem5, secondaryPointerY = _e.secondaryPointerY, setSecondaryPointerY = _e.setSecondaryPointerY, secondaryPointerItem = _e.secondaryPointerItem, setSecondaryPointerItem = _e.setSecondaryPointerItem, pointerItemsForSet = _e.pointerItemsForSet, setPointerItemsForSet = _e.setPointerItemsForSet, secondaryPointerItemsForSet = _e.secondaryPointerItemsForSet, setSecondaryPointerItemsForSet = _e.setSecondaryPointerItemsForSet, responderStartTime = _e.responderStartTime, setResponderStartTime = _e.setResponderStartTime, setResponderActive = _e.setResponderActive, points = _e.points, points2 = _e.points2, points3 = _e.points3, points4 = _e.points4, points5 = _e.points5, secondaryPoints = _e.secondaryPoints, fillPoints = _e.fillPoints, fillPoints2 = _e.fillPoints2, fillPoints3 = _e.fillPoints3, fillPoints4 = _e.fillPoints4, fillPoints5 = _e.fillPoints5, secondaryFillPoints = _e.secondaryFillPoints, pointsFromSet = _e.pointsFromSet, fillPointsFromSet = _e.fillPointsFromSet, arrowPointsFromSet = _e.arrowPointsFromSet, selectedIndex = _e.selectedIndex, setSelectedIndex = _e.setSelectedIndex, containerHeight = _e.containerHeight, data = _e.data, data2 = _e.data2, data3 = _e.data3, data4 = _e.data4, data5 = _e.data5, secondaryData = _e.secondaryData, dataSet = _e.dataSet, data0 = _e.data0, labelsExtraHeight = _e.labelsExtraHeight, animationDuration = _e.animationDuration, onDataChangeAnimationDuration = _e.onDataChangeAnimationDuration, animateTogether = _e.animateTogether, animateOnDataChange = _e.animateOnDataChange, startIndex1 = _e.startIndex1, startIndex2 = _e.startIndex2, endIndex1 = _e.endIndex1, endIndex2 = _e.endIndex2, startIndex3 = _e.startIndex3, endIndex3 = _e.endIndex3, startIndex4 = _e.startIndex4, endIndex4 = _e.endIndex4, startIndex5 = _e.startIndex5, endIndex5 = _e.endIndex5, initialSpacing = _e.initialSpacing, thickness = _e.thickness, yAxisLabelWidth = _e.yAxisLabelWidth, spacing = _e.spacing, xAxisThickness = _e.xAxisThickness, dataPointsHeight1 = _e.dataPointsHeight1, dataPointsWidth1 = _e.dataPointsWidth1, dataPointsRadius1 = _e.dataPointsRadius1, dataPointsColor1 = _e.dataPointsColor1, dataPointsShape1 = _e.dataPointsShape1, dataPointsHeight2 = _e.dataPointsHeight2, dataPointsWidth2 = _e.dataPointsWidth2, dataPointsRadius2 = _e.dataPointsRadius2, dataPointsColor2 = _e.dataPointsColor2, dataPointsShape2 = _e.dataPointsShape2, dataPointsHeight3 = _e.dataPointsHeight3, dataPointsWidth3 = _e.dataPointsWidth3, dataPointsRadius3 = _e.dataPointsRadius3, dataPointsColor3 = _e.dataPointsColor3, dataPointsShape3 = _e.dataPointsShape3, dataPointsHeight4 = _e.dataPointsHeight4, dataPointsWidth4 = _e.dataPointsWidth4, dataPointsRadius4 = _e.dataPointsRadius4, dataPointsColor4 = _e.dataPointsColor4, dataPointsShape4 = _e.dataPointsShape4, dataPointsHeight5 = _e.dataPointsHeight5, dataPointsWidth5 = _e.dataPointsWidth5, dataPointsRadius5 = _e.dataPointsRadius5, dataPointsColor5 = _e.dataPointsColor5, dataPointsShape5 = _e.dataPointsShape5, getIsNthAreaChart = _e.getIsNthAreaChart, textFontSize1 = _e.textFontSize1, textFontSize2 = _e.textFontSize2, textFontSize3 = _e.textFontSize3, textFontSize4 = _e.textFontSize4, textFontSize5 = _e.textFontSize5, textColor1 = _e.textColor1, textColor2 = _e.textColor2, textColor3 = _e.textColor3, textColor4 = _e.textColor4, textColor5 = _e.textColor5, totalWidth = _e.totalWidth, maxValue = _e.maxValue, overflowTop = _e.overflowTop, extendedContainerHeight = _e.extendedContainerHeight, getX = _e.getX, getY = _e.getY, getSecondaryY = _e.getSecondaryY, secondaryMaxValue = _e.secondaryMaxValue, showValuesAsDataPointsText = _e.showValuesAsDataPointsText, thickness1 = _e.thickness1, thickness2 = _e.thickness2, thickness3 = _e.thickness3, thickness4 = _e.thickness4, thickness5 = _e.thickness5, zIndex1 = _e.zIndex1, zIndex2 = _e.zIndex2, zIndex3 = _e.zIndex3, zIndex4 = _e.zIndex4, zIndex5 = _e.zIndex5, strokeDashArray1 = _e.strokeDashArray1, strokeDashArray2 = _e.strokeDashArray2, strokeDashArray3 = _e.strokeDashArray3, strokeDashArray4 = _e.strokeDashArray4, strokeDashArray5 = _e.strokeDashArray5, rotateLabel = _e.rotateLabel, isAnimated = _e.isAnimated, hideDataPoints1 = _e.hideDataPoints1, hideDataPoints2 = _e.hideDataPoints2, hideDataPoints3 = _e.hideDataPoints3, hideDataPoints4 = _e.hideDataPoints4, hideDataPoints5 = _e.hideDataPoints5, color1 = _e.color1, color2 = _e.color2, color3 = _e.color3, color4 = _e.color4, color5 = _e.color5, startFillColor1 = _e.startFillColor1, endFillColor1 = _e.endFillColor1, startOpacity1 = _e.startOpacity1, endOpacity1 = _e.endOpacity1, startFillColor2 = _e.startFillColor2, endFillColor2 = _e.endFillColor2, startOpacity2 = _e.startOpacity2, endOpacity2 = _e.endOpacity2, startFillColor3 = _e.startFillColor3, endFillColor3 = _e.endFillColor3, startOpacity3 = _e.startOpacity3, endOpacity3 = _e.endOpacity3, startFillColor4 = _e.startFillColor4, endFillColor4 = _e.endFillColor4, startOpacity4 = _e.startOpacity4, endOpacity4 = _e.endOpacity4, startFillColor5 = _e.startFillColor5, endFillColor5 = _e.endFillColor5, startOpacity5 = _e.startOpacity5, endOpacity5 = _e.endOpacity5, arrowStrokeWidth1 = _e.arrowStrokeWidth1, arrowStrokeColor1 = _e.arrowStrokeColor1, arrowFillColor1 = _e.arrowFillColor1, arrowStrokeWidth2 = _e.arrowStrokeWidth2, arrowStrokeColor2 = _e.arrowStrokeColor2, arrowFillColor2 = _e.arrowFillColor2, arrowStrokeWidth3 = _e.arrowStrokeWidth3, arrowStrokeColor3 = _e.arrowStrokeColor3, arrowFillColor3 = _e.arrowFillColor3, arrowStrokeWidth4 = _e.arrowStrokeWidth4, arrowStrokeColor4 = _e.arrowStrokeColor4, arrowFillColor4 = _e.arrowFillColor4, arrowStrokeWidth5 = _e.arrowStrokeWidth5, arrowStrokeColor5 = _e.arrowStrokeColor5, arrowFillColor5 = _e.arrowFillColor5, arrowStrokeWidthsFromSet = _e.arrowStrokeWidthsFromSet, arrowStrokeColorsFromSet = _e.arrowStrokeColorsFromSet, arrowFillColorsFromSet = _e.arrowFillColorsFromSet, secondaryLineConfig = _e.secondaryLineConfig, gradientDirection = _e.gradientDirection, stepHeight = _e.stepHeight, noOfSectionsBelowXAxis = _e.noOfSectionsBelowXAxis, xAxisTextNumberOfLines = _e.xAxisTextNumberOfLines, xAxisLabelsVerticalShift = _e.xAxisLabelsVerticalShift, pointerConfig = _e.pointerConfig, pointerHeight = _e.pointerHeight, pointerWidth = _e.pointerWidth, pointerRadius = _e.pointerRadius, pointerColor = _e.pointerColor, pointerComponent = _e.pointerComponent, showPointerStrip = _e.showPointerStrip, pointerStripHeight = _e.pointerStripHeight, pointerStripWidth = _e.pointerStripWidth, pointerStripColor = _e.pointerStripColor, pointerStripUptoDataPoint = _e.pointerStripUptoDataPoint, pointerLabelComponent = _e.pointerLabelComponent, stripOverPointer = _e.stripOverPointer, shiftPointerLabelX = _e.shiftPointerLabelX, shiftPointerLabelY = _e.shiftPointerLabelY, pointerLabelWidth = _e.pointerLabelWidth, pointerLabelHeight = _e.pointerLabelHeight, autoAdjustPointerLabelPosition = _e.autoAdjustPointerLabelPosition, pointerVanishDelay = _e.pointerVanishDelay, activatePointersOnLongPress = _e.activatePointersOnLongPress, activatePointersDelay = _e.activatePointersDelay, persistPointer = _e.persistPointer, hidePointers = _e.hidePointers, hidePointer1 = _e.hidePointer1, hidePointer2 = _e.hidePointer2, hidePointer3 = _e.hidePointer3, hidePointer4 = _e.hidePointer4, hidePointer5 = _e.hidePointer5, hideSecondaryPointer = _e.hideSecondaryPointer, pointerEvents = _e.pointerEvents, focusEnabled = _e.focusEnabled, showDataPointOnFocus = _e.showDataPointOnFocus, showStripOnFocus = _e.showStripOnFocus, showTextOnFocus = _e.showTextOnFocus, showDataPointLabelOnFocus = _e.showDataPointLabelOnFocus, stripHeight = _e.stripHeight, stripWidth = _e.stripWidth, stripColor = _e.stripColor, stripOpacity = _e.stripOpacity, stripStrokeDashArray = _e.stripStrokeDashArray, unFocusOnPressOut = _e.unFocusOnPressOut, delayBeforeUnFocus = _e.delayBeforeUnFocus, containerHeightIncludingBelowXAxis = _e.containerHeightIncludingBelowXAxis, lineGradient = _e.lineGradient, lineGradientDirection = _e.lineGradientDirection, lineGradientStartColor = _e.lineGradientStartColor, lineGradientEndColor = _e.lineGradientEndColor, barAndLineChartsWrapperProps = _e.barAndLineChartsWrapperProps, areaChart = _e.areaChart;
|
|
59
|
+
var secondaryXAxis = props.secondaryXAxis, intersectionAreaConfig = props.intersectionAreaConfig;
|
|
60
60
|
var widthValuesFromSet = useMemo(function () { return dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) { return new Animated.Value(0); }); }, []);
|
|
61
61
|
var animatedPoints = new Animated.Value(0);
|
|
62
62
|
var animatedFillPoints = new Animated.Value(0);
|
|
@@ -194,6 +194,18 @@ export var LineChart = function (props) {
|
|
|
194
194
|
decreaseWidth5,
|
|
195
195
|
labelsAppear,
|
|
196
196
|
]);
|
|
197
|
+
var svgWrapperViewStyle = {
|
|
198
|
+
position: 'absolute',
|
|
199
|
+
height: containerHeightIncludingBelowXAxis +
|
|
200
|
+
((_c = props.overflowBottom) !== null && _c !== void 0 ? _c : dataPointsRadius1),
|
|
201
|
+
bottom: 60 +
|
|
202
|
+
xAxisLabelsVerticalShift +
|
|
203
|
+
labelsExtraHeight -
|
|
204
|
+
xAxisThickness -
|
|
205
|
+
((_d = props.overflowBottom) !== null && _d !== void 0 ? _d : dataPointsRadius1),
|
|
206
|
+
zIndex: 1,
|
|
207
|
+
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
|
|
208
|
+
};
|
|
197
209
|
var renderLabel = function (top, index, label, labelTextStyle, labelComponent) {
|
|
198
210
|
var _a, _b;
|
|
199
211
|
return (_jsx(View, { style: [
|
|
@@ -424,12 +436,16 @@ export var LineChart = function (props) {
|
|
|
424
436
|
});
|
|
425
437
|
};
|
|
426
438
|
var renderPointer = function (lineNumber, isDataSet) {
|
|
439
|
+
if (hidePointers)
|
|
440
|
+
return;
|
|
427
441
|
if (isDataSet) {
|
|
428
442
|
var pointerItemLocal_1, pointerYLocal_1, pointerColorLocal_1;
|
|
429
443
|
return dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set, index) {
|
|
430
444
|
var _a, _b;
|
|
431
445
|
var pIndex = barAndLineChartsWrapperProps.pointerIndex;
|
|
432
446
|
pointerItemLocal_1 = set.data[pIndex];
|
|
447
|
+
if (set.hidePointers || (pointerItemLocal_1 === null || pointerItemLocal_1 === void 0 ? void 0 : pointerItemLocal_1.hidePointer))
|
|
448
|
+
return null;
|
|
433
449
|
pointerYLocal_1 = pointerYsForDataSet[index];
|
|
434
450
|
pointerColorLocal_1 =
|
|
435
451
|
(_b = (_a = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColorsForDataSet) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : pointerColor;
|
|
@@ -506,7 +522,7 @@ export var LineChart = function (props) {
|
|
|
506
522
|
});
|
|
507
523
|
};
|
|
508
524
|
var renderStripAndLabel = function () {
|
|
509
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
525
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
510
526
|
var pointerItemLocal, pointerYLocal;
|
|
511
527
|
pointerItemLocal = [
|
|
512
528
|
__assign(__assign({}, pointerItem), { value: (_b = (_a = props.data) === null || _a === void 0 ? void 0 : _a[pointerIndex]) === null || _b === void 0 ? void 0 : _b.value }),
|
|
@@ -528,9 +544,6 @@ export var LineChart = function (props) {
|
|
|
528
544
|
arr.push(pointerY5);
|
|
529
545
|
pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_k = (_j = props.data5) === null || _j === void 0 ? void 0 : _j[pointerIndex]) === null || _k === void 0 ? void 0 : _k.value }));
|
|
530
546
|
}
|
|
531
|
-
if (secondaryPointerY !== 0) {
|
|
532
|
-
pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_m = (_l = props.secondaryData) === null || _l === void 0 ? void 0 : _l[pointerIndex]) === null || _m === void 0 ? void 0 : _m.value }));
|
|
533
|
-
}
|
|
534
547
|
pointerYLocal = Math.min.apply(Math, __spreadArray([], __read(arr), false));
|
|
535
548
|
return StripAndLabel({
|
|
536
549
|
autoAdjustPointerLabelPosition: autoAdjustPointerLabelPosition,
|
|
@@ -547,6 +560,9 @@ export var LineChart = function (props) {
|
|
|
547
560
|
pointerStripHeight: pointerStripHeight,
|
|
548
561
|
shiftPointerLabelY: shiftPointerLabelY,
|
|
549
562
|
pointerItemLocal: pointerItemLocal,
|
|
563
|
+
secondaryPointerItem: secondaryPointerItem,
|
|
564
|
+
pointerItemsForSet: pointerItemsForSet,
|
|
565
|
+
secondaryPointerItemsForSet: secondaryPointerItemsForSet,
|
|
550
566
|
showPointerStrip: showPointerStrip,
|
|
551
567
|
pointerStripWidth: pointerStripWidth,
|
|
552
568
|
containerHeight: containerHeight,
|
|
@@ -554,13 +570,13 @@ export var LineChart = function (props) {
|
|
|
554
570
|
pointerStripColor: pointerStripColor,
|
|
555
571
|
pointerConfig: pointerConfig,
|
|
556
572
|
pointerLabelComponent: pointerLabelComponent,
|
|
557
|
-
secondaryPointerItem: secondaryPointerItem,
|
|
558
573
|
scrollX: scrollX,
|
|
559
574
|
pointerEvents: pointerEvents,
|
|
560
575
|
isBarChart: false,
|
|
561
576
|
pointerIndex: pointerIndex,
|
|
562
577
|
width: totalWidth,
|
|
563
578
|
screenWidth: screenWidth,
|
|
579
|
+
hasDataSet: !!dataSet,
|
|
564
580
|
});
|
|
565
581
|
};
|
|
566
582
|
var getLineGradientComponent = function () {
|
|
@@ -569,12 +585,18 @@ export var LineChart = function (props) {
|
|
|
569
585
|
var getAreaGradientComponent = function (startFillColor, endFillColor, startOpacity, endOpacity) {
|
|
570
586
|
return props.areaGradientComponent ? (props.areaGradientComponent()) : (_jsxs(LinearGradient, { id: "Gradient", x1: "0", y1: "0", x2: gradientDirection === 'horizontal' ? '1' : '0', y2: gradientDirection === 'vertical' ? '1' : '0', children: [_jsx(Stop, { offset: "0", stopColor: startFillColor, stopOpacity: startOpacity.toString() }), _jsx(Stop, { offset: "1", stopColor: endFillColor, stopOpacity: endOpacity.toString() })] }));
|
|
571
587
|
};
|
|
572
|
-
var
|
|
588
|
+
var renderIntersection = function () {
|
|
573
589
|
var _a;
|
|
590
|
+
return (_jsx(View, { style: [svgWrapperViewStyle, { width: totalWidth }], children: _jsxs(Svg, { children: [_jsx(Path, { id: "path1", d: fillPoints, fill: "none", stroke: 'none' }), _jsx(Path, { id: "path2", d: fillPoints2, fill: "none", stroke: 'none' }), _jsx(ClipPath, { id: "clip", children: _jsx(Use, { href: "#path1" }) }), _jsx(Path, { d: fillPoints2, clipPath: "url(#clip)", fill: (_a = intersectionAreaConfig === null || intersectionAreaConfig === void 0 ? void 0 : intersectionAreaConfig.fillColor) !== null && _a !== void 0 ? _a : 'white' }), _jsx(Path, { d: points, stroke: color1, strokeWidth: thickness1 !== null && thickness1 !== void 0 ? thickness1 : thickness, fill: 'none' })] }) }));
|
|
591
|
+
};
|
|
592
|
+
var lineSvgComponent = function (points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key, hideDataPoints, data, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText) {
|
|
593
|
+
var _a, _b;
|
|
574
594
|
if (!points)
|
|
575
595
|
return null;
|
|
576
596
|
var isCurved = points.includes('C');
|
|
577
|
-
var isNthAreaChart =
|
|
597
|
+
var isNthAreaChart = !!dataSet
|
|
598
|
+
? ((_a = dataSet[Number(key)].areaChart) !== null && _a !== void 0 ? _a : areaChart)
|
|
599
|
+
: getIsNthAreaChart(key !== null && key !== void 0 ? key : 0);
|
|
578
600
|
var ar = [{ d: '', color: '', strokeWidth: 0 }];
|
|
579
601
|
if (points.includes(RANGE_ENTER)) {
|
|
580
602
|
ar = getRegionPathObjects(points, color, currentLineThickness !== null && currentLineThickness !== void 0 ? currentLineThickness : 0, thickness, strokeDashArray !== null && strokeDashArray !== void 0 ? strokeDashArray : [], isCurved, RANGE_ENTER, STOP, RANGE_EXIT);
|
|
@@ -621,7 +643,7 @@ export var LineChart = function (props) {
|
|
|
621
643
|
? "url(#".concat(props.areaGradientId, ")")
|
|
622
644
|
: "url(#Gradient)", stroke: 'transparent', strokeWidth: currentLineThickness || thickness })) : (_jsx(Path, { onPress: props.onChartAreaPress, d: fillPoints, fill: props.areaGradientId
|
|
623
645
|
? "url(#".concat(props.areaGradientId, ")")
|
|
624
|
-
: "url(#Gradient)", stroke: 'transparent', strokeWidth: currentLineThickness || thickness }))) : null, renderSpecificVerticalLines(data), renderSpecificVerticalLines(data2), renderSpecificVerticalLines(data3), renderSpecificVerticalLines(data4), renderSpecificVerticalLines(data5), (
|
|
646
|
+
: "url(#Gradient)", stroke: 'transparent', strokeWidth: currentLineThickness || thickness }))) : null, renderSpecificVerticalLines(data), renderSpecificVerticalLines(data2), renderSpecificVerticalLines(data3), renderSpecificVerticalLines(data4), renderSpecificVerticalLines(data5), (_b = dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) { return renderSpecificVerticalLines(set === null || set === void 0 ? void 0 : set.data); })) !== null && _b !== void 0 ? _b : null, renderDataPoints(hideDataPoints, data, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText), showArrow && (_jsx(Path, { d: arrowPoints, fill: arrowFillColor, stroke: arrowStrokeColor, strokeWidth: arrowStrokeWidth }))] }));
|
|
625
647
|
};
|
|
626
648
|
var activatePointers = function (x) {
|
|
627
649
|
var factor = (x - initialSpacing) / spacing;
|
|
@@ -705,23 +727,31 @@ export var LineChart = function (props) {
|
|
|
705
727
|
}
|
|
706
728
|
}
|
|
707
729
|
if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
730
|
+
var pointerItemsForSetLocal_1 = [];
|
|
731
|
+
var secondaryPointerItemsForSetLocal_1 = [];
|
|
732
|
+
var ysForDataSet = dataSet.map(function (set) {
|
|
733
|
+
var item = set.data[factor];
|
|
734
|
+
if (set.isSecondary) {
|
|
735
|
+
secondaryPointerItemsForSetLocal_1.push(item);
|
|
736
|
+
}
|
|
737
|
+
else {
|
|
738
|
+
pointerItemsForSetLocal_1.push(item);
|
|
739
|
+
}
|
|
740
|
+
var y = item
|
|
741
|
+
? containerHeight -
|
|
742
|
+
(item.value * containerHeight) /
|
|
743
|
+
(set.isSecondary ? secondaryMaxValue : maxValue) -
|
|
744
|
+
(pointerRadius || pointerHeight / 2) +
|
|
745
|
+
10
|
|
746
|
+
: 0;
|
|
747
|
+
return y;
|
|
748
|
+
});
|
|
749
|
+
setPointerItemsForSet(pointerItemsForSetLocal_1);
|
|
750
|
+
setSecondaryPointerItemsForSet(secondaryPointerItemsForSetLocal_1);
|
|
751
|
+
setPointerYsForDataSet(ysForDataSet);
|
|
721
752
|
}
|
|
722
753
|
};
|
|
723
754
|
var renderLine = function (zIndex, points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, hideDataPoints, paramData, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText, key) {
|
|
724
|
-
var _a, _b;
|
|
725
755
|
return (_jsx(View, { onMoveShouldSetResponder: function (evt) { return (pointerConfig ? true : false); }, onResponderGrant: function (evt) {
|
|
726
756
|
if (!pointerConfig)
|
|
727
757
|
return;
|
|
@@ -745,100 +775,7 @@ export var LineChart = function (props) {
|
|
|
745
775
|
if (!activatePointersOnLongPress &&
|
|
746
776
|
x > (props.width || Dimensions.get('window').width))
|
|
747
777
|
return;
|
|
748
|
-
|
|
749
|
-
factor = Math.round(factor);
|
|
750
|
-
factor = Math.min(factor, (data0 !== null && data0 !== void 0 ? data0 : data).length - 1);
|
|
751
|
-
factor = Math.max(factor, 0);
|
|
752
|
-
var z = initialSpacing +
|
|
753
|
-
spacing * factor -
|
|
754
|
-
(pointerRadius || pointerWidth / 2) -
|
|
755
|
-
1;
|
|
756
|
-
var item, y;
|
|
757
|
-
setPointerX(z);
|
|
758
|
-
setPointerIndex(factor);
|
|
759
|
-
item = (data0 !== null && data0 !== void 0 ? data0 : data)[factor];
|
|
760
|
-
y =
|
|
761
|
-
containerHeight -
|
|
762
|
-
(item.value * containerHeight) / maxValue -
|
|
763
|
-
(pointerRadius || pointerHeight / 2) +
|
|
764
|
-
10;
|
|
765
|
-
setPointerY(y);
|
|
766
|
-
setPointerItem(item);
|
|
767
|
-
if (data2 && data2.length) {
|
|
768
|
-
item = data2[factor];
|
|
769
|
-
if (item) {
|
|
770
|
-
y =
|
|
771
|
-
containerHeight -
|
|
772
|
-
(item.value * containerHeight) / maxValue -
|
|
773
|
-
(pointerRadius || pointerHeight / 2) +
|
|
774
|
-
10;
|
|
775
|
-
setPointerY2(y);
|
|
776
|
-
setPointerItem2(item);
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
if (data3 && data3.length) {
|
|
780
|
-
item = data3[factor];
|
|
781
|
-
if (item) {
|
|
782
|
-
y =
|
|
783
|
-
containerHeight -
|
|
784
|
-
(item.value * containerHeight) / maxValue -
|
|
785
|
-
(pointerRadius || pointerHeight / 2) +
|
|
786
|
-
10;
|
|
787
|
-
setPointerY3(y);
|
|
788
|
-
setPointerItem3(item);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
if (data4 && data4.length) {
|
|
792
|
-
item = data4[factor];
|
|
793
|
-
if (item) {
|
|
794
|
-
y =
|
|
795
|
-
containerHeight -
|
|
796
|
-
(item.value * containerHeight) / maxValue -
|
|
797
|
-
(pointerRadius || pointerHeight / 2) +
|
|
798
|
-
10;
|
|
799
|
-
setPointerY4(y);
|
|
800
|
-
setPointerItem4(item);
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
if (data5 && data5.length) {
|
|
804
|
-
item = data5[factor];
|
|
805
|
-
if (item) {
|
|
806
|
-
y =
|
|
807
|
-
containerHeight -
|
|
808
|
-
(item.value * containerHeight) / maxValue -
|
|
809
|
-
(pointerRadius || pointerHeight / 2) +
|
|
810
|
-
10;
|
|
811
|
-
setPointerY5(y);
|
|
812
|
-
setPointerItem5(item);
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
if (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length) {
|
|
816
|
-
item = secondaryData[factor];
|
|
817
|
-
if (item) {
|
|
818
|
-
y =
|
|
819
|
-
containerHeight -
|
|
820
|
-
(item.value * containerHeight) / secondaryMaxValue -
|
|
821
|
-
(pointerRadius || pointerHeight / 2) +
|
|
822
|
-
10;
|
|
823
|
-
setSecondaryPointerY(y);
|
|
824
|
-
// @ts-ignore
|
|
825
|
-
setSecondaryPointerItem(item);
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
|
|
829
|
-
var ysForDataSet = dataSet.map(function (set) {
|
|
830
|
-
var item = set.data[factor];
|
|
831
|
-
var y = item
|
|
832
|
-
? containerHeight -
|
|
833
|
-
(item.value * containerHeight) /
|
|
834
|
-
(set.isSecondary ? secondaryMaxValue : maxValue) -
|
|
835
|
-
(pointerRadius || pointerHeight / 2) +
|
|
836
|
-
10
|
|
837
|
-
: 0;
|
|
838
|
-
return y;
|
|
839
|
-
});
|
|
840
|
-
setPointerYsForDataSet(ysForDataSet);
|
|
841
|
-
}
|
|
778
|
+
activatePointers(x);
|
|
842
779
|
},
|
|
843
780
|
// onResponderReject={evt => {
|
|
844
781
|
// console.log('evt...reject.......',evt);
|
|
@@ -859,22 +796,9 @@ export var LineChart = function (props) {
|
|
|
859
796
|
// setResponderActive(false);
|
|
860
797
|
// setTimeout(() => setPointerX(0), pointerVanishDelay);
|
|
861
798
|
// }}
|
|
862
|
-
style: {
|
|
863
|
-
position: 'absolute',
|
|
864
|
-
height: containerHeightIncludingBelowXAxis +
|
|
865
|
-
((_a = props.overflowBottom) !== null && _a !== void 0 ? _a : dataPointsRadius1),
|
|
866
|
-
bottom: 60 +
|
|
867
|
-
xAxisLabelsVerticalShift +
|
|
868
|
-
labelsExtraHeight -
|
|
869
|
-
xAxisThickness -
|
|
870
|
-
((_b = props.overflowBottom) !== null && _b !== void 0 ? _b : dataPointsRadius1),
|
|
871
|
-
zIndex: zIndex,
|
|
872
|
-
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
|
|
873
|
-
width: totalWidth,
|
|
874
|
-
}, children: lineSvgComponent(points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key, hideDataPoints, paramData, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText) }, key !== null && key !== void 0 ? key : 0));
|
|
799
|
+
style: [svgWrapperViewStyle, { width: totalWidth }], children: lineSvgComponent(points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key, hideDataPoints, paramData, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText) }, key !== null && key !== void 0 ? key : 0));
|
|
875
800
|
};
|
|
876
801
|
var renderAnimatedLine = function (zIndex, points, animatedWidth, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, hideDataPoints, paramsData, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText, key) {
|
|
877
|
-
var _a, _b;
|
|
878
802
|
return (_jsx(Animated.View, { onStartShouldSetResponder: function (evt) { return (pointerConfig ? true : false); }, onMoveShouldSetResponder: function (evt) { return (pointerConfig ? true : false); }, onResponderGrant: function (evt) {
|
|
879
803
|
if (!pointerConfig)
|
|
880
804
|
return;
|
|
@@ -898,102 +822,7 @@ export var LineChart = function (props) {
|
|
|
898
822
|
if (!activatePointersOnLongPress &&
|
|
899
823
|
x > (props.width || Dimensions.get('window').width))
|
|
900
824
|
return;
|
|
901
|
-
|
|
902
|
-
factor = Math.round(factor);
|
|
903
|
-
factor = Math.min(factor, (data0 !== null && data0 !== void 0 ? data0 : data).length - 1);
|
|
904
|
-
factor = Math.max(factor, 0);
|
|
905
|
-
var z = initialSpacing +
|
|
906
|
-
spacing * factor -
|
|
907
|
-
(pointerRadius || pointerWidth / 2) -
|
|
908
|
-
1;
|
|
909
|
-
var item, y;
|
|
910
|
-
setPointerX(z);
|
|
911
|
-
setPointerIndex(factor);
|
|
912
|
-
item = (data0 !== null && data0 !== void 0 ? data0 : data)[factor];
|
|
913
|
-
y =
|
|
914
|
-
containerHeight -
|
|
915
|
-
(item.value * containerHeight) / maxValue -
|
|
916
|
-
(pointerRadius || pointerHeight / 2) +
|
|
917
|
-
10;
|
|
918
|
-
setPointerY(y);
|
|
919
|
-
setPointerItem(item);
|
|
920
|
-
if (data2 && data2.length) {
|
|
921
|
-
item = data2[factor];
|
|
922
|
-
if (item) {
|
|
923
|
-
y =
|
|
924
|
-
containerHeight -
|
|
925
|
-
(item.value * containerHeight) / maxValue -
|
|
926
|
-
(pointerRadius || pointerHeight / 2) +
|
|
927
|
-
10;
|
|
928
|
-
setPointerY2(y);
|
|
929
|
-
setPointerItem2(item);
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
if (data3 && data3.length) {
|
|
933
|
-
item = data3[factor];
|
|
934
|
-
if (item) {
|
|
935
|
-
y =
|
|
936
|
-
containerHeight -
|
|
937
|
-
(item.value * containerHeight) / maxValue -
|
|
938
|
-
(pointerRadius || pointerHeight / 2) +
|
|
939
|
-
10;
|
|
940
|
-
setPointerY3(y);
|
|
941
|
-
setPointerItem3(item);
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
if (data4 && data4.length) {
|
|
945
|
-
item = data4[factor];
|
|
946
|
-
if (item) {
|
|
947
|
-
y =
|
|
948
|
-
containerHeight -
|
|
949
|
-
(item.value * containerHeight) / maxValue -
|
|
950
|
-
(pointerRadius || pointerHeight / 2) +
|
|
951
|
-
10;
|
|
952
|
-
setPointerY4(y);
|
|
953
|
-
setPointerItem4(item);
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
if (data5 && data5.length) {
|
|
957
|
-
item = data5[factor];
|
|
958
|
-
if (item) {
|
|
959
|
-
y =
|
|
960
|
-
containerHeight -
|
|
961
|
-
(item.value * containerHeight) / maxValue -
|
|
962
|
-
(pointerRadius || pointerHeight / 2) +
|
|
963
|
-
10;
|
|
964
|
-
setPointerY5(y);
|
|
965
|
-
setPointerItem5(item);
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
if (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length) {
|
|
969
|
-
item = secondaryData[factor];
|
|
970
|
-
if (item) {
|
|
971
|
-
y =
|
|
972
|
-
containerHeight -
|
|
973
|
-
(item.value * containerHeight) / secondaryMaxValue -
|
|
974
|
-
(pointerRadius || pointerHeight / 2) +
|
|
975
|
-
10;
|
|
976
|
-
setSecondaryPointerY(y);
|
|
977
|
-
// @ts-ignore
|
|
978
|
-
setSecondaryPointerItem(item);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
|
|
982
|
-
if (dataSet[0].data[factor]) {
|
|
983
|
-
var ysForDataSet = dataSet.map(function (set) {
|
|
984
|
-
var item = set.data[factor];
|
|
985
|
-
var y = item
|
|
986
|
-
? containerHeight -
|
|
987
|
-
(item.value * containerHeight) /
|
|
988
|
-
(set.isSecondary ? secondaryMaxValue : maxValue) -
|
|
989
|
-
(pointerRadius || pointerHeight / 2) +
|
|
990
|
-
10
|
|
991
|
-
: 0;
|
|
992
|
-
return y;
|
|
993
|
-
});
|
|
994
|
-
setPointerYsForDataSet(ysForDataSet);
|
|
995
|
-
}
|
|
996
|
-
}
|
|
825
|
+
activatePointers(x);
|
|
997
826
|
},
|
|
998
827
|
// onResponderReject={evt => {
|
|
999
828
|
// console.log('evt...reject.......',evt);
|
|
@@ -1014,19 +843,7 @@ export var LineChart = function (props) {
|
|
|
1014
843
|
// setResponderActive(false);
|
|
1015
844
|
// setTimeout(() => setPointerX(0), pointerVanishDelay);
|
|
1016
845
|
// }}
|
|
1017
|
-
style: {
|
|
1018
|
-
position: 'absolute',
|
|
1019
|
-
height: containerHeightIncludingBelowXAxis +
|
|
1020
|
-
((_a = props.overflowBottom) !== null && _a !== void 0 ? _a : dataPointsRadius1),
|
|
1021
|
-
bottom: 60 +
|
|
1022
|
-
xAxisLabelsVerticalShift +
|
|
1023
|
-
labelsExtraHeight -
|
|
1024
|
-
xAxisThickness -
|
|
1025
|
-
((_b = props.overflowBottom) !== null && _b !== void 0 ? _b : dataPointsRadius1),
|
|
1026
|
-
zIndex: zIndex,
|
|
1027
|
-
transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
|
|
1028
|
-
width: animatedWidth,
|
|
1029
|
-
}, children: lineSvgComponent(points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key, hideDataPoints, paramsData, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText) }, key !== null && key !== void 0 ? key : 0));
|
|
846
|
+
style: [svgWrapperViewStyle, { width: animatedWidth }], children: lineSvgComponent(points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key, hideDataPoints, paramsData, propsData, dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText) }, key !== null && key !== void 0 ? key : 0));
|
|
1030
847
|
};
|
|
1031
848
|
var remainingScrollViewProps = {
|
|
1032
849
|
onScroll: function (ev) {
|
|
@@ -1077,6 +894,9 @@ export var LineChart = function (props) {
|
|
|
1077
894
|
? isAnimated
|
|
1078
895
|
? renderAnimatedLine(zIndex5, points5, animatedWidth5, thickness5, color5, fillPoints5, startFillColor5, endFillColor5, startOpacity5, endOpacity5, strokeDashArray5, props.showArrow5 || props.showArrows, arrow5Points, arrowStrokeWidth5, arrowStrokeColor5, arrowFillColor5, hideDataPoints5, data5, props.data5, dataPointsShape5, dataPointsWidth5, dataPointsHeight5, dataPointsColor5, dataPointsRadius5, textColor5, textFontSize5, startIndex5, endIndex5, false, showValuesAsDataPointsText, 4)
|
|
1079
896
|
: renderLine(zIndex5, points5, thickness5, color5, fillPoints5, startFillColor5, endFillColor5, startOpacity5, endOpacity5, strokeDashArray5, props.showArrow5 || props.showArrows, arrow5Points, arrowStrokeWidth5, arrowStrokeColor5, arrowFillColor5, hideDataPoints5, data5, props.data5, dataPointsShape5, dataPointsWidth5, dataPointsHeight5, dataPointsColor5, dataPointsRadius5, textColor5, textFontSize5, startIndex5, endIndex5, false, showValuesAsDataPointsText, 4)
|
|
897
|
+
: null, intersectionAreaConfig &&
|
|
898
|
+
(props.areaChart || (props.areaChart1 && props.areaChart2))
|
|
899
|
+
? renderIntersection()
|
|
1080
900
|
: null, pointerX > 0 ? (_jsxs(View, { pointerEvents: pointerEvents !== null && pointerEvents !== void 0 ? pointerEvents : 'none', style: {
|
|
1081
901
|
position: 'absolute',
|
|
1082
902
|
height: extendedContainerHeight + noOfSectionsBelowXAxis * stepHeight,
|
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.26",
|
|
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.28"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/cli": "^7.24.8",
|