gifted-charts-core 0.1.49 → 0.1.50

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.
@@ -39,11 +39,11 @@ import { AxesAndRulesDefaults, LineDefaults, SEGMENT_END, SEGMENT_START, chartTy
39
39
  import { computeMaxAndMinItems, getAllArrowProperties, getArrowPoints, getAxesAndRulesProps, getCurvePathWithSegments, getExtendedContainerHeightWithPadding, getLineSegmentsDueToNoExtrapolation, getLineSegmentsForMissingValues, getMaxValue, getNoOfSections, getPathWithHighlight, getSanitisedData, getSecondaryDataWithOffsetIncluded, getSegmentString, indexOfFirstNonZeroDigit, svgPath } from '../utils';
40
40
  import { EdgePosition } from '../utils/types';
41
41
  export var useLineChart = function (props) {
42
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, _231, _232, _233, _234, _235, _236, _237, _238, _239, _240, _241, _242, _243, _244, _245, _246, _247, _248, _249, _250, _251, _252, _253, _254, _255, _256, _257, _258, _259, _260, _261, _262, _263, _264, _265, _266, _267, _268, _269, _270, _271, _272, _273, _274, _275, _276, _277, _278, _279, _280, _281, _282, _283, _284, _285, _286, _287, _288, _289, _290, _291, _292, _293, _294, _295, _296, _297, _298, _299, _300, _301, _302, _303, _304, _305, _306, _307, _308, _309, _310, _311, _312;
43
- var showDataPointsForMissingValues = props.showDataPointsForMissingValues, _313 = props.interpolateMissingValues, interpolateMissingValues = _313 === void 0 ? true : _313, _314 = props.extrapolateMissingValues, extrapolateMissingValues = _314 === void 0 ? true : _314, yAxisOffset = props.yAxisOffset, parentWidth = props.parentWidth, negativeStepValue = props.negativeStepValue;
42
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, _231, _232, _233, _234, _235, _236, _237, _238, _239, _240, _241, _242, _243, _244, _245, _246, _247, _248, _249, _250, _251, _252, _253, _254, _255, _256, _257, _258, _259, _260, _261, _262, _263, _264, _265, _266, _267, _268, _269, _270, _271, _272, _273, _274, _275, _276, _277, _278, _279, _280, _281, _282, _283, _284, _285, _286, _287, _288, _289, _290, _291, _292, _293, _294, _295, _296, _297, _298, _299, _300, _301, _302, _303, _304, _305, _306, _307, _308, _309, _310, _311, _312, _313, _314;
43
+ var showDataPointsForMissingValues = props.showDataPointsForMissingValues, _315 = props.interpolateMissingValues, interpolateMissingValues = _315 === void 0 ? true : _315, _316 = props.extrapolateMissingValues, extrapolateMissingValues = _316 === void 0 ? true : _316, yAxisOffset = props.yAxisOffset, parentWidth = props.parentWidth, negativeStepValue = props.negativeStepValue;
44
44
  var lastLineNumber = 1;
45
45
  if (props.secondaryData) {
46
- lastLineNumber = 666;
46
+ lastLineNumber = 6667; // lastLineNumber is 6667 for a secondary line, so the index or key of the secondary line is 6666
47
47
  }
48
48
  if (props.data2)
49
49
  lastLineNumber = 2;
@@ -56,55 +56,55 @@ export var useLineChart = function (props) {
56
56
  if (((_b = (_a = props.dataSet) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > lastLineNumber)
57
57
  lastLineNumber = (_d = (_c = props.dataSet) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0;
58
58
  var containsNegativeValue = ((_e = props.mostNegativeValue) !== null && _e !== void 0 ? _e : 0) < 0 ||
59
- ((_j = ((_h = (_g = (_f = props.dataSet) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.data) !== null && _h !== void 0 ? _h : props.data)) === null || _j === void 0 ? void 0 : _j.some(function (item) { return item.value < 0; }));
59
+ ((_j = ((_h = (_g = (_f = props.dataSet) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.data) !== null && _h !== void 0 ? _h : props.data)) === null || _j === void 0 ? void 0 : _j.some(function (item) { var _a; return ((_a = item.value) !== null && _a !== void 0 ? _a : 0) < 0; }));
60
60
  var onlyPositive = (_k = props.onlyPositive) !== null && _k !== void 0 ? _k : (!extrapolateMissingValues ? (containsNegativeValue ? false : true) : false);
61
61
  // the default value of onlyPositive is usually supposed to be false
62
62
  // but we are setting it to true if extrapolateMissingValues is false and there are no negative values
63
63
  // because in absence of extrapolation we don't want the chart to unnecessarily show the 4th quadrant
64
64
  var curvature = (_l = props.curvature) !== null && _l !== void 0 ? _l : LineDefaults.curvature;
65
65
  var curveType = (_m = props.curveType) !== null && _m !== void 0 ? _m : LineDefaults.curveType;
66
- var _315 = __read(useState(0), 2), scrollX = _315[0], setScrollX = _315[1];
67
- var _316 = __read(useState(''), 2), arrow1Points = _316[0], setArrow1Points = _316[1];
68
- var _317 = __read(useState(''), 2), arrow2Points = _317[0], setArrow2Points = _317[1];
69
- var _318 = __read(useState(''), 2), arrow3Points = _318[0], setArrow3Points = _318[1];
70
- var _319 = __read(useState(''), 2), arrow4Points = _319[0], setArrow4Points = _319[1];
71
- var _320 = __read(useState(''), 2), arrow5Points = _320[0], setArrow5Points = _320[1];
72
- var _321 = __read(useState(''), 2), secondaryArrowPoints = _321[0], setSecondaryArrowPoints = _321[1];
73
- var _322 = __read(useState(-1), 2), pointerIndex = _322[0], setPointerIndex = _322[1];
74
- var _323 = __read(useState(0), 2), pointerX = _323[0], setPointerX = _323[1];
75
- var _324 = __read(useState(0), 2), pointerY = _324[0], setPointerY = _324[1];
76
- var _325 = __read(useState(), 2), pointerItem = _325[0], setPointerItem = _325[1];
77
- var _326 = __read(useState(0), 2), pointerY2 = _326[0], setPointerY2 = _326[1];
78
- var _327 = __read(useState(), 2), pointerItem2 = _327[0], setPointerItem2 = _327[1];
79
- var _328 = __read(useState(0), 2), pointerY3 = _328[0], setPointerY3 = _328[1];
80
- var _329 = __read(useState(), 2), pointerItem3 = _329[0], setPointerItem3 = _329[1];
81
- var _330 = __read(useState(0), 2), pointerY4 = _330[0], setPointerY4 = _330[1];
82
- var _331 = __read(useState(), 2), pointerItem4 = _331[0], setPointerItem4 = _331[1];
83
- var _332 = __read(useState(0), 2), pointerY5 = _332[0], setPointerY5 = _332[1];
84
- var _333 = __read(useState([]), 2), pointerYsForDataSet = _333[0], setPointerYsForDataSet = _333[1];
85
- var _334 = __read(useState(), 2), pointerItem5 = _334[0], setPointerItem5 = _334[1];
86
- var _335 = __read(useState(0), 2), secondaryPointerY = _335[0], setSecondaryPointerY = _335[1];
87
- var _336 = __read(useState(), 2), secondaryPointerItem = _336[0], setSecondaryPointerItem = _336[1];
88
- var _337 = __read(useState([]), 2), pointerItemsForSet = _337[0], setPointerItemsForSet = _337[1];
89
- var _338 = __read(useState([]), 2), secondaryPointerItemsForSet = _338[0], setSecondaryPointerItemsForSet = _338[1];
90
- var _339 = __read(useState(0), 2), responderStartTime = _339[0], setResponderStartTime = _339[1];
91
- var _340 = __read(useState(false), 2), responderActive = _340[0], setResponderActive = _340[1];
92
- var _341 = __read(useState(''), 2), points = _341[0], setPoints = _341[1];
93
- var _342 = __read(useState(''), 2), points2 = _342[0], setPoints2 = _342[1];
94
- var _343 = __read(useState(''), 2), points3 = _343[0], setPoints3 = _343[1];
95
- var _344 = __read(useState(''), 2), points4 = _344[0], setPoints4 = _344[1];
96
- var _345 = __read(useState(''), 2), points5 = _345[0], setPoints5 = _345[1];
97
- var _346 = __read(useState(''), 2), secondaryPoints = _346[0], setSecondaryPoints = _346[1];
98
- var _347 = __read(useState(''), 2), fillPoints = _347[0], setFillPoints = _347[1];
99
- var _348 = __read(useState(''), 2), fillPoints2 = _348[0], setFillPoints2 = _348[1];
100
- var _349 = __read(useState(''), 2), fillPoints3 = _349[0], setFillPoints3 = _349[1];
101
- var _350 = __read(useState(''), 2), fillPoints4 = _350[0], setFillPoints4 = _350[1];
102
- var _351 = __read(useState(''), 2), fillPoints5 = _351[0], setFillPoints5 = _351[1];
103
- var _352 = __read(useState(''), 2), secondaryFillPoints = _352[0], setSecondaryFillPoints = _352[1];
104
- var _353 = __read(useState([]), 2), pointsFromSet = _353[0], setPointsFromSet = _353[1];
105
- var _354 = __read(useState([]), 2), fillPointsFromSet = _354[0], setFillPointsFromSet = _354[1];
106
- var _355 = __read(useState([]), 2), arrowPointsFromSet = _355[0], setArrowPointsFromSet = _355[1];
107
- var _356 = __read(useState((_o = props.focusedDataPointIndex) !== null && _o !== void 0 ? _o : -1), 2), selectedIndex = _356[0], setSelectedIndex = _356[1];
66
+ var _317 = __read(useState(0), 2), scrollX = _317[0], setScrollX = _317[1];
67
+ var _318 = __read(useState(''), 2), arrow1Points = _318[0], setArrow1Points = _318[1];
68
+ var _319 = __read(useState(''), 2), arrow2Points = _319[0], setArrow2Points = _319[1];
69
+ var _320 = __read(useState(''), 2), arrow3Points = _320[0], setArrow3Points = _320[1];
70
+ var _321 = __read(useState(''), 2), arrow4Points = _321[0], setArrow4Points = _321[1];
71
+ var _322 = __read(useState(''), 2), arrow5Points = _322[0], setArrow5Points = _322[1];
72
+ var _323 = __read(useState(''), 2), secondaryArrowPoints = _323[0], setSecondaryArrowPoints = _323[1];
73
+ var _324 = __read(useState(-1), 2), pointerIndex = _324[0], setPointerIndex = _324[1];
74
+ var _325 = __read(useState(0), 2), pointerX = _325[0], setPointerX = _325[1];
75
+ var _326 = __read(useState(0), 2), pointerY = _326[0], setPointerY = _326[1];
76
+ var _327 = __read(useState(), 2), pointerItem = _327[0], setPointerItem = _327[1];
77
+ var _328 = __read(useState(0), 2), pointerY2 = _328[0], setPointerY2 = _328[1];
78
+ var _329 = __read(useState(), 2), pointerItem2 = _329[0], setPointerItem2 = _329[1];
79
+ var _330 = __read(useState(0), 2), pointerY3 = _330[0], setPointerY3 = _330[1];
80
+ var _331 = __read(useState(), 2), pointerItem3 = _331[0], setPointerItem3 = _331[1];
81
+ var _332 = __read(useState(0), 2), pointerY4 = _332[0], setPointerY4 = _332[1];
82
+ var _333 = __read(useState(), 2), pointerItem4 = _333[0], setPointerItem4 = _333[1];
83
+ var _334 = __read(useState(0), 2), pointerY5 = _334[0], setPointerY5 = _334[1];
84
+ var _335 = __read(useState([]), 2), pointerYsForDataSet = _335[0], setPointerYsForDataSet = _335[1];
85
+ var _336 = __read(useState(), 2), pointerItem5 = _336[0], setPointerItem5 = _336[1];
86
+ var _337 = __read(useState(0), 2), secondaryPointerY = _337[0], setSecondaryPointerY = _337[1];
87
+ var _338 = __read(useState(), 2), secondaryPointerItem = _338[0], setSecondaryPointerItem = _338[1];
88
+ var _339 = __read(useState([]), 2), pointerItemsForSet = _339[0], setPointerItemsForSet = _339[1];
89
+ var _340 = __read(useState([]), 2), secondaryPointerItemsForSet = _340[0], setSecondaryPointerItemsForSet = _340[1];
90
+ var _341 = __read(useState(0), 2), responderStartTime = _341[0], setResponderStartTime = _341[1];
91
+ var _342 = __read(useState(false), 2), responderActive = _342[0], setResponderActive = _342[1];
92
+ var _343 = __read(useState(''), 2), points = _343[0], setPoints = _343[1];
93
+ var _344 = __read(useState(''), 2), points2 = _344[0], setPoints2 = _344[1];
94
+ var _345 = __read(useState(''), 2), points3 = _345[0], setPoints3 = _345[1];
95
+ var _346 = __read(useState(''), 2), points4 = _346[0], setPoints4 = _346[1];
96
+ var _347 = __read(useState(''), 2), points5 = _347[0], setPoints5 = _347[1];
97
+ var _348 = __read(useState(''), 2), secondaryPoints = _348[0], setSecondaryPoints = _348[1];
98
+ var _349 = __read(useState(''), 2), fillPoints = _349[0], setFillPoints = _349[1];
99
+ var _350 = __read(useState(''), 2), fillPoints2 = _350[0], setFillPoints2 = _350[1];
100
+ var _351 = __read(useState(''), 2), fillPoints3 = _351[0], setFillPoints3 = _351[1];
101
+ var _352 = __read(useState(''), 2), fillPoints4 = _352[0], setFillPoints4 = _352[1];
102
+ var _353 = __read(useState(''), 2), fillPoints5 = _353[0], setFillPoints5 = _353[1];
103
+ var _354 = __read(useState(''), 2), secondaryFillPoints = _354[0], setSecondaryFillPoints = _354[1];
104
+ var _355 = __read(useState([]), 2), pointsFromSet = _355[0], setPointsFromSet = _355[1];
105
+ var _356 = __read(useState([]), 2), fillPointsFromSet = _356[0], setFillPointsFromSet = _356[1];
106
+ var _357 = __read(useState([]), 2), arrowPointsFromSet = _357[0], setArrowPointsFromSet = _357[1];
107
+ var _358 = __read(useState((_o = props.focusedDataPointIndex) !== null && _o !== void 0 ? _o : -1), 2), selectedIndex = _358[0], setSelectedIndex = _358[1];
108
108
  useEffect(function () {
109
109
  var _a;
110
110
  setSelectedIndex((_a = props.focusedDataPointIndex) !== null && _a !== void 0 ? _a : -1);
@@ -124,25 +124,27 @@ export var useLineChart = function (props) {
124
124
  var data4 = useMemo(function () { return getSanitisedData(props.data4, dataSanitisationProps); }, [yAxisOffset, props.data4]);
125
125
  var data5 = useMemo(function () { return getSanitisedData(props.data5, dataSanitisationProps); }, [yAxisOffset, props.data5]);
126
126
  var secondaryData = (_r = getSecondaryDataWithOffsetIncluded(props.secondaryData, props.secondaryYAxis, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive)) !== null && _r !== void 0 ? _r : [];
127
- var dataSet = props.dataSet;
128
- if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
127
+ var dataSet = undefined;
128
+ if ((_s = props.dataSet) === null || _s === void 0 ? void 0 : _s.length) {
129
129
  dataSet = useMemo(function () {
130
- return dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (dataSetItem) {
130
+ var _a;
131
+ return (_a = props.dataSet) === null || _a === void 0 ? void 0 : _a.map(function (dataSetItem) {
131
132
  var sanitisedData = getSanitisedData(dataSetItem.data, dataSanitisationProps);
132
133
  return __assign(__assign({}, dataSetItem), { data: sanitisedData });
133
134
  });
134
- }, [yAxisOffset, dataSet]);
135
+ }, [yAxisOffset, props.dataSet]);
135
136
  }
136
- var data0 = (_s = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _s === void 0 ? void 0 : _s.data;
137
- var scrollToEnd = (_t = props.scrollToEnd) !== null && _t !== void 0 ? _t : LineDefaults.scrollToEnd;
138
- var scrollAnimation = (_u = props.scrollAnimation) !== null && _u !== void 0 ? _u : LineDefaults.scrollAnimation;
139
- var scrollEventThrottle = (_v = props.scrollEventThrottle) !== null && _v !== void 0 ? _v : LineDefaults.scrollEventThrottle;
140
- var labelsExtraHeight = (_w = props.labelsExtraHeight) !== null && _w !== void 0 ? _w : 0;
141
- var animationDuration = (_x = props.animationDuration) !== null && _x !== void 0 ? _x : LineDefaults.animationDuration;
142
- var onDataChangeAnimationDuration = (_y = props.onDataChangeAnimationDuration) !== null && _y !== void 0 ? _y : 400;
143
- var animateTogether = (_z = props.animateTogether) !== null && _z !== void 0 ? _z : LineDefaults.animateTogether;
144
- var animateOnDataChange = (_0 = props.animateOnDataChange) !== null && _0 !== void 0 ? _0 : false;
145
- var startIndex1 = (_2 = (_1 = props.startIndex1) !== null && _1 !== void 0 ? _1 : props.startIndex) !== null && _2 !== void 0 ? _2 : 0;
137
+ var data0 = (_t = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _t === void 0 ? void 0 : _t.data;
138
+ var scrollToEnd = (_u = props.scrollToEnd) !== null && _u !== void 0 ? _u : LineDefaults.scrollToEnd;
139
+ var scrollAnimation = (_v = props.scrollAnimation) !== null && _v !== void 0 ? _v : LineDefaults.scrollAnimation;
140
+ var scrollEventThrottle = (_w = props.scrollEventThrottle) !== null && _w !== void 0 ? _w : LineDefaults.scrollEventThrottle;
141
+ var labelsExtraHeight = (_x = props.labelsExtraHeight) !== null && _x !== void 0 ? _x : 0;
142
+ var animationDuration = (_y = props.animationDuration) !== null && _y !== void 0 ? _y : LineDefaults.animationDuration;
143
+ var onDataChangeAnimationDuration = (_z = props.onDataChangeAnimationDuration) !== null && _z !== void 0 ? _z : 400;
144
+ var animateTogether = (_0 = props.animateTogether) !== null && _0 !== void 0 ? _0 : LineDefaults.animateTogether;
145
+ var renderDataPointsAfterAnimationEnds = (_1 = props.renderDataPointsAfterAnimationEnds) !== null && _1 !== void 0 ? _1 : LineDefaults.renderDataPointsAfterAnimationEnds;
146
+ var animateOnDataChange = (_2 = props.animateOnDataChange) !== null && _2 !== void 0 ? _2 : false;
147
+ var startIndex1 = (_4 = (_3 = props.startIndex1) !== null && _3 !== void 0 ? _3 : props.startIndex) !== null && _4 !== void 0 ? _4 : 0;
146
148
  var endIndex1;
147
149
  if (props.endIndex1 === undefined || props.endIndex1 === null) {
148
150
  if (props.endIndex === undefined || props.endIndex === null) {
@@ -155,14 +157,14 @@ export var useLineChart = function (props) {
155
157
  else {
156
158
  endIndex1 = props.endIndex1;
157
159
  }
158
- var startIndex2 = (_3 = props.startIndex2) !== null && _3 !== void 0 ? _3 : 0;
159
- var endIndex2 = (_4 = props.endIndex2) !== null && _4 !== void 0 ? _4 : data2.length - 1;
160
- var startIndex3 = (_5 = props.startIndex3) !== null && _5 !== void 0 ? _5 : 0;
161
- var endIndex3 = (_6 = props.endIndex3) !== null && _6 !== void 0 ? _6 : data3.length - 1;
162
- var startIndex4 = (_7 = props.startIndex4) !== null && _7 !== void 0 ? _7 : 0;
163
- var endIndex4 = (_8 = props.endIndex4) !== null && _8 !== void 0 ? _8 : data4.length - 1;
164
- var startIndex5 = (_9 = props.startIndex5) !== null && _9 !== void 0 ? _9 : 0;
165
- var endIndex5 = (_10 = props.endIndex5) !== null && _10 !== void 0 ? _10 : data5.length - 1;
160
+ var startIndex2 = (_5 = props.startIndex2) !== null && _5 !== void 0 ? _5 : 0;
161
+ var endIndex2 = (_6 = props.endIndex2) !== null && _6 !== void 0 ? _6 : data2.length - 1;
162
+ var startIndex3 = (_7 = props.startIndex3) !== null && _7 !== void 0 ? _7 : 0;
163
+ var endIndex3 = (_8 = props.endIndex3) !== null && _8 !== void 0 ? _8 : data3.length - 1;
164
+ var startIndex4 = (_9 = props.startIndex4) !== null && _9 !== void 0 ? _9 : 0;
165
+ var endIndex4 = (_10 = props.endIndex4) !== null && _10 !== void 0 ? _10 : data4.length - 1;
166
+ var startIndex5 = (_11 = props.startIndex5) !== null && _11 !== void 0 ? _11 : 0;
167
+ var endIndex5 = (_12 = props.endIndex5) !== null && _12 !== void 0 ? _12 : data5.length - 1;
166
168
  var lengthOfLongestDataArray = Math.max(data.length, data2.length, data3.length, data4.length, data5.length);
167
169
  var lineSegments = !interpolateMissingValues
168
170
  ? getLineSegmentsForMissingValues(props.data)
@@ -190,43 +192,43 @@ export var useLineChart = function (props) {
190
192
  ? getLineSegmentsDueToNoExtrapolation(props.data5)
191
193
  : props.lineSegments5;
192
194
  var highlightedRange = props.highlightedRange;
193
- var adjustToWidth = (_11 = props.adjustToWidth) !== null && _11 !== void 0 ? _11 : false;
194
- var initialSpacing = (_12 = props.initialSpacing) !== null && _12 !== void 0 ? _12 : LineDefaults.initialSpacing;
195
- var endSpacing = (_13 = props.endSpacing) !== null && _13 !== void 0 ? _13 : (adjustToWidth ? 0 : LineDefaults.endSpacing);
196
- var thickness = (_14 = props.thickness) !== null && _14 !== void 0 ? _14 : LineDefaults.thickness;
197
- var yAxisLabelWidth = (_15 = props.yAxisLabelWidth) !== null && _15 !== void 0 ? _15 : (props.hideYAxisText
195
+ var adjustToWidth = (_13 = props.adjustToWidth) !== null && _13 !== void 0 ? _13 : false;
196
+ var initialSpacing = (_14 = props.initialSpacing) !== null && _14 !== void 0 ? _14 : LineDefaults.initialSpacing;
197
+ var endSpacing = (_15 = props.endSpacing) !== null && _15 !== void 0 ? _15 : (adjustToWidth ? 0 : LineDefaults.endSpacing);
198
+ var thickness = (_16 = props.thickness) !== null && _16 !== void 0 ? _16 : LineDefaults.thickness;
199
+ var yAxisLabelWidth = (_17 = props.yAxisLabelWidth) !== null && _17 !== void 0 ? _17 : (props.hideYAxisText
198
200
  ? AxesAndRulesDefaults.yAxisEmptyLabelWidth
199
201
  : AxesAndRulesDefaults.yAxisLabelWidth);
200
- var spacing = (_16 = props.spacing) !== null && _16 !== void 0 ? _16 : (adjustToWidth
201
- ? (((_17 = props.width) !== null && _17 !== void 0 ? _17 : parentWidth - yAxisLabelWidth) - initialSpacing) /
202
+ var spacing = (_18 = props.spacing) !== null && _18 !== void 0 ? _18 : (adjustToWidth
203
+ ? (((_19 = props.width) !== null && _19 !== void 0 ? _19 : parentWidth - yAxisLabelWidth) - initialSpacing) /
202
204
  Math.max((data0 !== null && data0 !== void 0 ? data0 : data).length - 1, 1)
203
205
  : LineDefaults.spacing);
204
- var xAxisThickness = (_18 = props.xAxisThickness) !== null && _18 !== void 0 ? _18 : AxesAndRulesDefaults.xAxisThickness;
205
- var dataPointsHeight1 = (_20 = (_19 = props.dataPointsHeight1) !== null && _19 !== void 0 ? _19 : props.dataPointsHeight) !== null && _20 !== void 0 ? _20 : LineDefaults.dataPointsHeight;
206
- var dataPointsWidth1 = (_22 = (_21 = props.dataPointsWidth1) !== null && _21 !== void 0 ? _21 : props.dataPointsWidth) !== null && _22 !== void 0 ? _22 : LineDefaults.dataPointsWidth;
207
- var dataPointsRadius1 = (_24 = (_23 = props.dataPointsRadius1) !== null && _23 !== void 0 ? _23 : props.dataPointsRadius) !== null && _24 !== void 0 ? _24 : LineDefaults.dataPointsRadius;
208
- var dataPointsColor1 = (_26 = (_25 = props.dataPointsColor1) !== null && _25 !== void 0 ? _25 : props.dataPointsColor) !== null && _26 !== void 0 ? _26 : LineDefaults.dataPointsColor;
209
- var dataPointsShape1 = (_28 = (_27 = props.dataPointsShape1) !== null && _27 !== void 0 ? _27 : props.dataPointsShape) !== null && _28 !== void 0 ? _28 : LineDefaults.dataPointsShape;
210
- var dataPointsHeight2 = (_30 = (_29 = props.dataPointsHeight2) !== null && _29 !== void 0 ? _29 : props.dataPointsHeight) !== null && _30 !== void 0 ? _30 : LineDefaults.dataPointsHeight;
211
- var dataPointsWidth2 = (_32 = (_31 = props.dataPointsWidth2) !== null && _31 !== void 0 ? _31 : props.dataPointsWidth) !== null && _32 !== void 0 ? _32 : LineDefaults.dataPointsWidth;
212
- var dataPointsRadius2 = (_34 = (_33 = props.dataPointsRadius2) !== null && _33 !== void 0 ? _33 : props.dataPointsRadius) !== null && _34 !== void 0 ? _34 : LineDefaults.dataPointsRadius;
213
- var dataPointsColor2 = (_36 = (_35 = props.dataPointsColor2) !== null && _35 !== void 0 ? _35 : props.dataPointsColor) !== null && _36 !== void 0 ? _36 : LineDefaults.dataPointsColor2;
214
- var dataPointsShape2 = (_38 = (_37 = props.dataPointsShape2) !== null && _37 !== void 0 ? _37 : props.dataPointsShape) !== null && _38 !== void 0 ? _38 : LineDefaults.dataPointsShape;
215
- var dataPointsHeight3 = (_40 = (_39 = props.dataPointsHeight3) !== null && _39 !== void 0 ? _39 : props.dataPointsHeight) !== null && _40 !== void 0 ? _40 : LineDefaults.dataPointsHeight;
216
- var dataPointsWidth3 = (_42 = (_41 = props.dataPointsWidth3) !== null && _41 !== void 0 ? _41 : props.dataPointsWidth) !== null && _42 !== void 0 ? _42 : LineDefaults.dataPointsWidth;
217
- var dataPointsRadius3 = (_44 = (_43 = props.dataPointsRadius3) !== null && _43 !== void 0 ? _43 : props.dataPointsRadius) !== null && _44 !== void 0 ? _44 : LineDefaults.dataPointsRadius;
218
- var dataPointsColor3 = (_46 = (_45 = props.dataPointsColor3) !== null && _45 !== void 0 ? _45 : props.dataPointsColor) !== null && _46 !== void 0 ? _46 : LineDefaults.dataPointsColor3;
219
- var dataPointsShape3 = (_48 = (_47 = props.dataPointsShape3) !== null && _47 !== void 0 ? _47 : props.dataPointsShape) !== null && _48 !== void 0 ? _48 : LineDefaults.dataPointsShape;
220
- var dataPointsHeight4 = (_50 = (_49 = props.dataPointsHeight4) !== null && _49 !== void 0 ? _49 : props.dataPointsHeight) !== null && _50 !== void 0 ? _50 : LineDefaults.dataPointsHeight;
221
- var dataPointsWidth4 = (_52 = (_51 = props.dataPointsWidth4) !== null && _51 !== void 0 ? _51 : props.dataPointsWidth) !== null && _52 !== void 0 ? _52 : LineDefaults.dataPointsWidth;
222
- var dataPointsRadius4 = (_54 = (_53 = props.dataPointsRadius4) !== null && _53 !== void 0 ? _53 : props.dataPointsRadius) !== null && _54 !== void 0 ? _54 : LineDefaults.dataPointsRadius;
223
- var dataPointsColor4 = (_56 = (_55 = props.dataPointsColor4) !== null && _55 !== void 0 ? _55 : props.dataPointsColor) !== null && _56 !== void 0 ? _56 : LineDefaults.dataPointsColor;
224
- var dataPointsShape4 = (_58 = (_57 = props.dataPointsShape4) !== null && _57 !== void 0 ? _57 : props.dataPointsShape) !== null && _58 !== void 0 ? _58 : LineDefaults.dataPointsShape;
225
- var dataPointsHeight5 = (_60 = (_59 = props.dataPointsHeight5) !== null && _59 !== void 0 ? _59 : props.dataPointsHeight) !== null && _60 !== void 0 ? _60 : LineDefaults.dataPointsHeight;
226
- var dataPointsWidth5 = (_62 = (_61 = props.dataPointsWidth5) !== null && _61 !== void 0 ? _61 : props.dataPointsWidth) !== null && _62 !== void 0 ? _62 : LineDefaults.dataPointsWidth;
227
- var dataPointsRadius5 = (_64 = (_63 = props.dataPointsRadius5) !== null && _63 !== void 0 ? _63 : props.dataPointsRadius) !== null && _64 !== void 0 ? _64 : LineDefaults.dataPointsRadius;
228
- var dataPointsColor5 = (_66 = (_65 = props.dataPointsColor5) !== null && _65 !== void 0 ? _65 : props.dataPointsColor) !== null && _66 !== void 0 ? _66 : LineDefaults.dataPointsColor;
229
- var dataPointsShape5 = (_68 = (_67 = props.dataPointsShape5) !== null && _67 !== void 0 ? _67 : props.dataPointsShape) !== null && _68 !== void 0 ? _68 : LineDefaults.dataPointsShape;
206
+ var xAxisThickness = (_20 = props.xAxisThickness) !== null && _20 !== void 0 ? _20 : AxesAndRulesDefaults.xAxisThickness;
207
+ var dataPointsHeight1 = (_22 = (_21 = props.dataPointsHeight1) !== null && _21 !== void 0 ? _21 : props.dataPointsHeight) !== null && _22 !== void 0 ? _22 : LineDefaults.dataPointsHeight;
208
+ var dataPointsWidth1 = (_24 = (_23 = props.dataPointsWidth1) !== null && _23 !== void 0 ? _23 : props.dataPointsWidth) !== null && _24 !== void 0 ? _24 : LineDefaults.dataPointsWidth;
209
+ var dataPointsRadius1 = (_26 = (_25 = props.dataPointsRadius1) !== null && _25 !== void 0 ? _25 : props.dataPointsRadius) !== null && _26 !== void 0 ? _26 : LineDefaults.dataPointsRadius;
210
+ var dataPointsColor1 = (_28 = (_27 = props.dataPointsColor1) !== null && _27 !== void 0 ? _27 : props.dataPointsColor) !== null && _28 !== void 0 ? _28 : LineDefaults.dataPointsColor;
211
+ var dataPointsShape1 = (_30 = (_29 = props.dataPointsShape1) !== null && _29 !== void 0 ? _29 : props.dataPointsShape) !== null && _30 !== void 0 ? _30 : LineDefaults.dataPointsShape;
212
+ var dataPointsHeight2 = (_32 = (_31 = props.dataPointsHeight2) !== null && _31 !== void 0 ? _31 : props.dataPointsHeight) !== null && _32 !== void 0 ? _32 : LineDefaults.dataPointsHeight;
213
+ var dataPointsWidth2 = (_34 = (_33 = props.dataPointsWidth2) !== null && _33 !== void 0 ? _33 : props.dataPointsWidth) !== null && _34 !== void 0 ? _34 : LineDefaults.dataPointsWidth;
214
+ var dataPointsRadius2 = (_36 = (_35 = props.dataPointsRadius2) !== null && _35 !== void 0 ? _35 : props.dataPointsRadius) !== null && _36 !== void 0 ? _36 : LineDefaults.dataPointsRadius;
215
+ var dataPointsColor2 = (_38 = (_37 = props.dataPointsColor2) !== null && _37 !== void 0 ? _37 : props.dataPointsColor) !== null && _38 !== void 0 ? _38 : LineDefaults.dataPointsColor2;
216
+ var dataPointsShape2 = (_40 = (_39 = props.dataPointsShape2) !== null && _39 !== void 0 ? _39 : props.dataPointsShape) !== null && _40 !== void 0 ? _40 : LineDefaults.dataPointsShape;
217
+ var dataPointsHeight3 = (_42 = (_41 = props.dataPointsHeight3) !== null && _41 !== void 0 ? _41 : props.dataPointsHeight) !== null && _42 !== void 0 ? _42 : LineDefaults.dataPointsHeight;
218
+ var dataPointsWidth3 = (_44 = (_43 = props.dataPointsWidth3) !== null && _43 !== void 0 ? _43 : props.dataPointsWidth) !== null && _44 !== void 0 ? _44 : LineDefaults.dataPointsWidth;
219
+ var dataPointsRadius3 = (_46 = (_45 = props.dataPointsRadius3) !== null && _45 !== void 0 ? _45 : props.dataPointsRadius) !== null && _46 !== void 0 ? _46 : LineDefaults.dataPointsRadius;
220
+ var dataPointsColor3 = (_48 = (_47 = props.dataPointsColor3) !== null && _47 !== void 0 ? _47 : props.dataPointsColor) !== null && _48 !== void 0 ? _48 : LineDefaults.dataPointsColor3;
221
+ var dataPointsShape3 = (_50 = (_49 = props.dataPointsShape3) !== null && _49 !== void 0 ? _49 : props.dataPointsShape) !== null && _50 !== void 0 ? _50 : LineDefaults.dataPointsShape;
222
+ var dataPointsHeight4 = (_52 = (_51 = props.dataPointsHeight4) !== null && _51 !== void 0 ? _51 : props.dataPointsHeight) !== null && _52 !== void 0 ? _52 : LineDefaults.dataPointsHeight;
223
+ var dataPointsWidth4 = (_54 = (_53 = props.dataPointsWidth4) !== null && _53 !== void 0 ? _53 : props.dataPointsWidth) !== null && _54 !== void 0 ? _54 : LineDefaults.dataPointsWidth;
224
+ var dataPointsRadius4 = (_56 = (_55 = props.dataPointsRadius4) !== null && _55 !== void 0 ? _55 : props.dataPointsRadius) !== null && _56 !== void 0 ? _56 : LineDefaults.dataPointsRadius;
225
+ var dataPointsColor4 = (_58 = (_57 = props.dataPointsColor4) !== null && _57 !== void 0 ? _57 : props.dataPointsColor) !== null && _58 !== void 0 ? _58 : LineDefaults.dataPointsColor;
226
+ var dataPointsShape4 = (_60 = (_59 = props.dataPointsShape4) !== null && _59 !== void 0 ? _59 : props.dataPointsShape) !== null && _60 !== void 0 ? _60 : LineDefaults.dataPointsShape;
227
+ var dataPointsHeight5 = (_62 = (_61 = props.dataPointsHeight5) !== null && _61 !== void 0 ? _61 : props.dataPointsHeight) !== null && _62 !== void 0 ? _62 : LineDefaults.dataPointsHeight;
228
+ var dataPointsWidth5 = (_64 = (_63 = props.dataPointsWidth5) !== null && _63 !== void 0 ? _63 : props.dataPointsWidth) !== null && _64 !== void 0 ? _64 : LineDefaults.dataPointsWidth;
229
+ var dataPointsRadius5 = (_66 = (_65 = props.dataPointsRadius5) !== null && _65 !== void 0 ? _65 : props.dataPointsRadius) !== null && _66 !== void 0 ? _66 : LineDefaults.dataPointsRadius;
230
+ var dataPointsColor5 = (_68 = (_67 = props.dataPointsColor5) !== null && _67 !== void 0 ? _67 : props.dataPointsColor) !== null && _68 !== void 0 ? _68 : LineDefaults.dataPointsColor;
231
+ var dataPointsShape5 = (_70 = (_69 = props.dataPointsShape5) !== null && _69 !== void 0 ? _69 : props.dataPointsShape) !== null && _70 !== void 0 ? _70 : LineDefaults.dataPointsShape;
230
232
  var areaChart = props.areaChart;
231
233
  var areaChart1 = props.areaChart1;
232
234
  var areaChart2 = props.areaChart2;
@@ -259,28 +261,28 @@ export var useLineChart = function (props) {
259
261
  }
260
262
  return false;
261
263
  };
262
- var stepChart = (_69 = props.stepChart) !== null && _69 !== void 0 ? _69 : false;
263
- var stepChart1 = (_70 = props.stepChart1) !== null && _70 !== void 0 ? _70 : false;
264
- var stepChart2 = (_71 = props.stepChart2) !== null && _71 !== void 0 ? _71 : false;
265
- var stepChart3 = (_72 = props.stepChart3) !== null && _72 !== void 0 ? _72 : false;
266
- var stepChart4 = (_73 = props.stepChart4) !== null && _73 !== void 0 ? _73 : false;
267
- var stepChart5 = (_74 = props.stepChart5) !== null && _74 !== void 0 ? _74 : false;
268
- var edgePosition = (_75 = props.edgePosition) !== null && _75 !== void 0 ? _75 : LineDefaults.edgePosition;
269
- var textFontSize1 = (_77 = (_76 = props.textFontSize1) !== null && _76 !== void 0 ? _76 : props.textFontSize) !== null && _77 !== void 0 ? _77 : LineDefaults.textFontSize;
270
- var textFontSize2 = (_79 = (_78 = props.textFontSize2) !== null && _78 !== void 0 ? _78 : props.textFontSize) !== null && _79 !== void 0 ? _79 : LineDefaults.textFontSize;
271
- var textFontSize3 = (_81 = (_80 = props.textFontSize3) !== null && _80 !== void 0 ? _80 : props.textFontSize) !== null && _81 !== void 0 ? _81 : LineDefaults.textFontSize;
272
- var textFontSize4 = (_83 = (_82 = props.textFontSize4) !== null && _82 !== void 0 ? _82 : props.textFontSize) !== null && _83 !== void 0 ? _83 : LineDefaults.textFontSize;
273
- var textFontSize5 = (_85 = (_84 = props.textFontSize5) !== null && _84 !== void 0 ? _84 : props.textFontSize) !== null && _85 !== void 0 ? _85 : LineDefaults.textFontSize;
274
- var textColor1 = (_87 = (_86 = props.textColor1) !== null && _86 !== void 0 ? _86 : props.textColor) !== null && _87 !== void 0 ? _87 : LineDefaults.textColor;
275
- var textColor2 = (_89 = (_88 = props.textColor2) !== null && _88 !== void 0 ? _88 : props.textColor) !== null && _89 !== void 0 ? _89 : LineDefaults.textColor;
276
- var textColor3 = (_91 = (_90 = props.textColor3) !== null && _90 !== void 0 ? _90 : props.textColor) !== null && _91 !== void 0 ? _91 : LineDefaults.textColor;
277
- var textColor4 = (_93 = (_92 = props.textColor4) !== null && _92 !== void 0 ? _92 : props.textColor) !== null && _93 !== void 0 ? _93 : LineDefaults.textColor;
278
- var textColor5 = (_95 = (_94 = props.textColor5) !== null && _94 !== void 0 ? _94 : props.textColor) !== null && _95 !== void 0 ? _95 : LineDefaults.textColor;
264
+ var stepChart = (_71 = props.stepChart) !== null && _71 !== void 0 ? _71 : false;
265
+ var stepChart1 = (_72 = props.stepChart1) !== null && _72 !== void 0 ? _72 : false;
266
+ var stepChart2 = (_73 = props.stepChart2) !== null && _73 !== void 0 ? _73 : false;
267
+ var stepChart3 = (_74 = props.stepChart3) !== null && _74 !== void 0 ? _74 : false;
268
+ var stepChart4 = (_75 = props.stepChart4) !== null && _75 !== void 0 ? _75 : false;
269
+ var stepChart5 = (_76 = props.stepChart5) !== null && _76 !== void 0 ? _76 : false;
270
+ var edgePosition = (_77 = props.edgePosition) !== null && _77 !== void 0 ? _77 : LineDefaults.edgePosition;
271
+ var textFontSize1 = (_79 = (_78 = props.textFontSize1) !== null && _78 !== void 0 ? _78 : props.textFontSize) !== null && _79 !== void 0 ? _79 : LineDefaults.textFontSize;
272
+ var textFontSize2 = (_81 = (_80 = props.textFontSize2) !== null && _80 !== void 0 ? _80 : props.textFontSize) !== null && _81 !== void 0 ? _81 : LineDefaults.textFontSize;
273
+ var textFontSize3 = (_83 = (_82 = props.textFontSize3) !== null && _82 !== void 0 ? _82 : props.textFontSize) !== null && _83 !== void 0 ? _83 : LineDefaults.textFontSize;
274
+ var textFontSize4 = (_85 = (_84 = props.textFontSize4) !== null && _84 !== void 0 ? _84 : props.textFontSize) !== null && _85 !== void 0 ? _85 : LineDefaults.textFontSize;
275
+ var textFontSize5 = (_87 = (_86 = props.textFontSize5) !== null && _86 !== void 0 ? _86 : props.textFontSize) !== null && _87 !== void 0 ? _87 : LineDefaults.textFontSize;
276
+ var textColor1 = (_89 = (_88 = props.textColor1) !== null && _88 !== void 0 ? _88 : props.textColor) !== null && _89 !== void 0 ? _89 : LineDefaults.textColor;
277
+ var textColor2 = (_91 = (_90 = props.textColor2) !== null && _90 !== void 0 ? _90 : props.textColor) !== null && _91 !== void 0 ? _91 : LineDefaults.textColor;
278
+ var textColor3 = (_93 = (_92 = props.textColor3) !== null && _92 !== void 0 ? _92 : props.textColor) !== null && _93 !== void 0 ? _93 : LineDefaults.textColor;
279
+ var textColor4 = (_95 = (_94 = props.textColor4) !== null && _94 !== void 0 ? _94 : props.textColor) !== null && _95 !== void 0 ? _95 : LineDefaults.textColor;
280
+ var textColor5 = (_97 = (_96 = props.textColor5) !== null && _96 !== void 0 ? _96 : props.textColor) !== null && _97 !== void 0 ? _97 : LineDefaults.textColor;
279
281
  var mergedPrimaryDataArrays = [];
280
282
  var mergedSecondaryDataArrays = [];
281
283
  var maxSpacingSum = 0; // max of spacingSum among all the lines
282
284
  var cumulativeSpacing1 = [], cumulativeSpacing2 = [], cumulativeSpacing3 = [], cumulativeSpacing4 = [], cumulativeSpacing5 = [], cumulativeSpacingSecondary = [];
283
- var cumulativeSpacingForSet = Array((_96 = dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) !== null && _96 !== void 0 ? _96 : 0).fill([]);
285
+ var cumulativeSpacingForSet = Array((_98 = dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) !== null && _98 !== void 0 ? _98 : 0).fill([]);
284
286
  var strips = {};
285
287
  if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
286
288
  dataSet.forEach(function (set, key) {
@@ -309,7 +311,7 @@ export var useLineChart = function (props) {
309
311
  }
310
312
  else {
311
313
  var spacingSum_1 = 0;
312
- var space_1 = (_97 = props.spacing1) !== null && _97 !== void 0 ? _97 : spacing;
314
+ var space_1 = (_99 = props.spacing1) !== null && _99 !== void 0 ? _99 : spacing;
313
315
  data.forEach(function (item, index) {
314
316
  var _a, _b;
315
317
  spacingSum_1 += (_a = item.spacing) !== null && _a !== void 0 ? _a : space_1;
@@ -324,7 +326,7 @@ export var useLineChart = function (props) {
324
326
  }
325
327
  if (data2 === null || data2 === void 0 ? void 0 : data2.length) {
326
328
  spacingSum_1 = 0;
327
- space_1 = (_98 = props.spacing2) !== null && _98 !== void 0 ? _98 : spacing;
329
+ space_1 = (_100 = props.spacing2) !== null && _100 !== void 0 ? _100 : spacing;
328
330
  data2.forEach(function (item, index) {
329
331
  var _a, _b;
330
332
  spacingSum_1 += (_a = item.spacing) !== null && _a !== void 0 ? _a : space_1;
@@ -340,7 +342,7 @@ export var useLineChart = function (props) {
340
342
  }
341
343
  if (data3 === null || data3 === void 0 ? void 0 : data3.length) {
342
344
  spacingSum_1 = 0;
343
- space_1 = (_99 = props.spacing3) !== null && _99 !== void 0 ? _99 : spacing;
345
+ space_1 = (_101 = props.spacing3) !== null && _101 !== void 0 ? _101 : spacing;
344
346
  data3.forEach(function (item, index) {
345
347
  var _a, _b;
346
348
  spacingSum_1 += (_a = item.spacing) !== null && _a !== void 0 ? _a : space_1;
@@ -356,7 +358,7 @@ export var useLineChart = function (props) {
356
358
  }
357
359
  if (data4 === null || data4 === void 0 ? void 0 : data4.length) {
358
360
  spacingSum_1 = 0;
359
- space_1 = (_100 = props.spacing4) !== null && _100 !== void 0 ? _100 : spacing;
361
+ space_1 = (_102 = props.spacing4) !== null && _102 !== void 0 ? _102 : spacing;
360
362
  data4.forEach(function (item, index) {
361
363
  var _a, _b;
362
364
  spacingSum_1 += (_a = item.spacing) !== null && _a !== void 0 ? _a : space_1;
@@ -372,7 +374,7 @@ export var useLineChart = function (props) {
372
374
  }
373
375
  if (data5 === null || data5 === void 0 ? void 0 : data5.length) {
374
376
  spacingSum_1 = 0;
375
- space_1 = (_101 = props.spacing5) !== null && _101 !== void 0 ? _101 : spacing;
377
+ space_1 = (_103 = props.spacing5) !== null && _103 !== void 0 ? _103 : spacing;
376
378
  data5.forEach(function (item, index) {
377
379
  var _a, _b;
378
380
  spacingSum_1 += (_a = item.spacing) !== null && _a !== void 0 ? _a : space_1;
@@ -388,7 +390,7 @@ export var useLineChart = function (props) {
388
390
  }
389
391
  if (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length) {
390
392
  spacingSum_1 = 0;
391
- space_1 = (_103 = (_102 = props.secondaryLineConfig) === null || _102 === void 0 ? void 0 : _102.spacing) !== null && _103 !== void 0 ? _103 : spacing;
393
+ space_1 = (_105 = (_104 = props.secondaryLineConfig) === null || _104 === void 0 ? void 0 : _104.spacing) !== null && _105 !== void 0 ? _105 : spacing;
392
394
  secondaryData.forEach(function (item) {
393
395
  var _a;
394
396
  spacingSum_1 += (_a = item.spacing) !== null && _a !== void 0 ? _a : space_1;
@@ -408,12 +410,12 @@ export var useLineChart = function (props) {
408
410
  var valuesRange = Math.max.apply(Math, __spreadArray([], __read(mergedPrimaryDataArrays.map(function (i) { return Math.max(i.value, 0); })), false)) - // find the largest +ve number
409
411
  Math.min.apply(// find the largest +ve number
410
412
  Math, __spreadArray([], __read(mergedPrimaryDataArrays.map(function (i) { return Math.max(i.value, 0); })), false)); // find the smallest +ve number
411
- var showFractionalValues = (_104 = props.showFractionalValues) !== null && _104 !== void 0 ? _104 : (isFinite(valuesRange) && valuesRange <= 1);
412
- var roundToDigits = (_105 = props.roundToDigits) !== null && _105 !== void 0 ? _105 : (showFractionalValues ? indexOfFirstNonZeroDigit(valuesRange) + 1 : 0);
413
- var _357 = computeMaxAndMinItems(mergedPrimaryDataArrays, roundToDigits, showFractionalValues), maxItem = _357.maxItem, minItem = _357.minItem;
413
+ var showFractionalValues = (_106 = props.showFractionalValues) !== null && _106 !== void 0 ? _106 : (isFinite(valuesRange) && valuesRange <= 1);
414
+ var roundToDigits = (_107 = props.roundToDigits) !== null && _107 !== void 0 ? _107 : (showFractionalValues ? indexOfFirstNonZeroDigit(valuesRange) + 1 : 0);
415
+ var _359 = computeMaxAndMinItems(mergedPrimaryDataArrays, roundToDigits, showFractionalValues), maxItem = _359.maxItem, minItem = _359.minItem;
414
416
  var maxValue = getMaxValue(props.maxValue, props.stepValue, noOfSections, maxItem) || 10;
415
- var mostNegativeValue = (_106 = props.mostNegativeValue) !== null && _106 !== void 0 ? _106 : minItem;
416
- var overflowTop = ((_107 = props.overflowTop) !== null && _107 !== void 0 ? _107 : props.secondaryXAxis)
417
+ var mostNegativeValue = (_108 = props.mostNegativeValue) !== null && _108 !== void 0 ? _108 : minItem;
418
+ var overflowTop = ((_109 = props.overflowTop) !== null && _109 !== void 0 ? _109 : props.secondaryXAxis)
417
419
  ? AxesAndRulesDefaults.overflowTopWithSecondaryXAxis
418
420
  : AxesAndRulesDefaults.overflowTop;
419
421
  var extendedContainerHeight = getExtendedContainerHeightWithPadding(containerHeight, overflowTop);
@@ -426,100 +428,100 @@ export var useLineChart = function (props) {
426
428
  var secondaryValuesRange = Math.max.apply(Math, __spreadArray([], __read(mergedSecondaryDataArrays.map(function (i) { return Math.max(i.value, 0); })), false)) - // find the largest +ve number
427
429
  Math.min.apply(// find the largest +ve number
428
430
  Math, __spreadArray([], __read(mergedSecondaryDataArrays.map(function (i) { return Math.max(i.value, 0); })), false)); // find the smallest +ve number
429
- var showSecondaryFractionalValues = (_109 = (_108 = props.secondaryYAxis) === null || _108 === void 0 ? void 0 : _108.showFractionalValues) !== null && _109 !== void 0 ? _109 : secondaryValuesRange <= 1;
430
- var secondaryRoundToDigits = (_111 = (_110 = props.secondaryYAxis) === null || _110 === void 0 ? void 0 : _110.roundToDigits) !== null && _111 !== void 0 ? _111 : (showSecondaryFractionalValues
431
+ var showSecondaryFractionalValues = (_111 = (_110 = props.secondaryYAxis) === null || _110 === void 0 ? void 0 : _110.showFractionalValues) !== null && _111 !== void 0 ? _111 : secondaryValuesRange <= 1;
432
+ var secondaryRoundToDigits = (_113 = (_112 = props.secondaryYAxis) === null || _112 === void 0 ? void 0 : _112.roundToDigits) !== null && _113 !== void 0 ? _113 : (showSecondaryFractionalValues
431
433
  ? indexOfFirstNonZeroDigit(secondaryValuesRange) + 1
432
434
  : 0);
433
- var _358 = computeMaxAndMinItems(mergedSecondaryDataArrays, secondaryRoundToDigits, showSecondaryFractionalValues), secondaryMaxItem = _358.maxItem, secondaryMinItem = _358.minItem;
434
- var secondaryMaxValue = (_113 = (_112 = props.secondaryYAxis) === null || _112 === void 0 ? void 0 : _112.maxValue) !== null && _113 !== void 0 ? _113 : (secondaryMaxItem || maxValue);
435
+ var _360 = computeMaxAndMinItems(mergedSecondaryDataArrays, secondaryRoundToDigits, showSecondaryFractionalValues), secondaryMaxItem = _360.maxItem, secondaryMinItem = _360.minItem;
436
+ var secondaryMaxValue = (_115 = (_114 = props.secondaryYAxis) === null || _114 === void 0 ? void 0 : _114.maxValue) !== null && _115 !== void 0 ? _115 : (secondaryMaxItem || maxValue);
435
437
  var getSecondaryY = function (value) {
436
438
  return extendedContainerHeight - (value * containerHeight) / secondaryMaxValue;
437
439
  };
438
440
  var heightUptoXaxis = extendedContainerHeight - xAxisThickness;
439
- var showValuesAsDataPointsText = (_114 = props.showValuesAsDataPointsText) !== null && _114 !== void 0 ? _114 : LineDefaults.showValuesAsDataPointsText;
440
- var thickness1 = (_116 = (_115 = props.thickness1) !== null && _115 !== void 0 ? _115 : props.thickness) !== null && _116 !== void 0 ? _116 : LineDefaults.thickness;
441
- var thickness2 = (_118 = (_117 = props.thickness2) !== null && _117 !== void 0 ? _117 : props.thickness) !== null && _118 !== void 0 ? _118 : LineDefaults.thickness;
442
- var thickness3 = (_120 = (_119 = props.thickness3) !== null && _119 !== void 0 ? _119 : props.thickness) !== null && _120 !== void 0 ? _120 : LineDefaults.thickness;
443
- var thickness4 = (_122 = (_121 = props.thickness4) !== null && _121 !== void 0 ? _121 : props.thickness) !== null && _122 !== void 0 ? _122 : LineDefaults.thickness;
444
- var thickness5 = (_124 = (_123 = props.thickness5) !== null && _123 !== void 0 ? _123 : props.thickness) !== null && _124 !== void 0 ? _124 : LineDefaults.thickness;
445
- var zIndex1 = (_125 = props.zIndex1) !== null && _125 !== void 0 ? _125 : 0;
446
- var zIndex2 = (_126 = props.zIndex2) !== null && _126 !== void 0 ? _126 : 0;
447
- var zIndex3 = (_127 = props.zIndex3) !== null && _127 !== void 0 ? _127 : 0;
448
- var zIndex4 = (_128 = props.zIndex4) !== null && _128 !== void 0 ? _128 : 0;
449
- var zIndex5 = (_129 = props.zIndex5) !== null && _129 !== void 0 ? _129 : 0;
450
- var strokeDashArray1 = (_130 = props.strokeDashArray1) !== null && _130 !== void 0 ? _130 : props.strokeDashArray;
451
- var strokeDashArray2 = (_131 = props.strokeDashArray2) !== null && _131 !== void 0 ? _131 : props.strokeDashArray;
452
- var strokeDashArray3 = (_132 = props.strokeDashArray3) !== null && _132 !== void 0 ? _132 : props.strokeDashArray;
453
- var strokeDashArray4 = (_133 = props.strokeDashArray4) !== null && _133 !== void 0 ? _133 : props.strokeDashArray;
454
- var strokeDashArray5 = (_134 = props.strokeDashArray5) !== null && _134 !== void 0 ? _134 : props.strokeDashArray;
455
- var rotateLabel = (_135 = props.rotateLabel) !== null && _135 !== void 0 ? _135 : false;
456
- var isAnimated = (_136 = props.isAnimated) !== null && _136 !== void 0 ? _136 : false;
457
- var hideDataPoints1 = (_138 = (_137 = props.hideDataPoints) !== null && _137 !== void 0 ? _137 : props.hideDataPoints1) !== null && _138 !== void 0 ? _138 : false;
458
- var hideDataPoints2 = (_140 = (_139 = props.hideDataPoints) !== null && _139 !== void 0 ? _139 : props.hideDataPoints2) !== null && _140 !== void 0 ? _140 : false;
459
- var hideDataPoints3 = (_142 = (_141 = props.hideDataPoints) !== null && _141 !== void 0 ? _141 : props.hideDataPoints3) !== null && _142 !== void 0 ? _142 : false;
460
- var hideDataPoints4 = (_144 = (_143 = props.hideDataPoints) !== null && _143 !== void 0 ? _143 : props.hideDataPoints4) !== null && _144 !== void 0 ? _144 : false;
461
- var hideDataPoints5 = (_146 = (_145 = props.hideDataPoints) !== null && _145 !== void 0 ? _145 : props.hideDataPoints5) !== null && _146 !== void 0 ? _146 : false;
462
- var color1 = (_148 = (_147 = props.color1) !== null && _147 !== void 0 ? _147 : props.color) !== null && _148 !== void 0 ? _148 : LineDefaults.color;
463
- var color2 = (_150 = (_149 = props.color2) !== null && _149 !== void 0 ? _149 : props.color) !== null && _150 !== void 0 ? _150 : LineDefaults.color;
464
- var color3 = (_152 = (_151 = props.color3) !== null && _151 !== void 0 ? _151 : props.color) !== null && _152 !== void 0 ? _152 : LineDefaults.color;
465
- var color4 = (_154 = (_153 = props.color4) !== null && _153 !== void 0 ? _153 : props.color) !== null && _154 !== void 0 ? _154 : LineDefaults.color;
466
- var color5 = (_156 = (_155 = props.color5) !== null && _155 !== void 0 ? _155 : props.color) !== null && _156 !== void 0 ? _156 : LineDefaults.color;
467
- var startFillColor1 = (_158 = (_157 = props.startFillColor1) !== null && _157 !== void 0 ? _157 : props.startFillColor) !== null && _158 !== void 0 ? _158 : LineDefaults.startFillColor;
468
- var endFillColor1 = (_160 = (_159 = props.endFillColor1) !== null && _159 !== void 0 ? _159 : props.endFillColor) !== null && _160 !== void 0 ? _160 : LineDefaults.endFillColor;
469
- var startOpacity = (_161 = props.startOpacity) !== null && _161 !== void 0 ? _161 : LineDefaults.startOpacity;
470
- var endOpacity = (_162 = props.endOpacity) !== null && _162 !== void 0 ? _162 : LineDefaults.endOpacity;
471
- var startOpacity1 = (_163 = props.startOpacity1) !== null && _163 !== void 0 ? _163 : startOpacity;
472
- var endOpacity1 = (_164 = props.endOpacity1) !== null && _164 !== void 0 ? _164 : endOpacity;
473
- var startFillColor2 = (_166 = (_165 = props.startFillColor2) !== null && _165 !== void 0 ? _165 : props.startFillColor) !== null && _166 !== void 0 ? _166 : LineDefaults.startFillColor;
474
- var endFillColor2 = (_168 = (_167 = props.endFillColor2) !== null && _167 !== void 0 ? _167 : props.endFillColor) !== null && _168 !== void 0 ? _168 : LineDefaults.endFillColor;
475
- var startOpacity2 = (_169 = props.startOpacity2) !== null && _169 !== void 0 ? _169 : startOpacity;
476
- var endOpacity2 = (_170 = props.endOpacity2) !== null && _170 !== void 0 ? _170 : endOpacity;
477
- var startFillColor3 = (_172 = (_171 = props.startFillColor3) !== null && _171 !== void 0 ? _171 : props.startFillColor) !== null && _172 !== void 0 ? _172 : LineDefaults.startFillColor;
478
- var endFillColor3 = (_174 = (_173 = props.endFillColor3) !== null && _173 !== void 0 ? _173 : props.endFillColor) !== null && _174 !== void 0 ? _174 : LineDefaults.endFillColor;
479
- var startOpacity3 = (_175 = props.startOpacity3) !== null && _175 !== void 0 ? _175 : startOpacity;
480
- var endOpacity3 = (_176 = props.endOpacity3) !== null && _176 !== void 0 ? _176 : endOpacity;
481
- var startFillColor4 = (_178 = (_177 = props.startFillColor4) !== null && _177 !== void 0 ? _177 : props.startFillColor) !== null && _178 !== void 0 ? _178 : LineDefaults.startFillColor;
482
- var endFillColor4 = (_180 = (_179 = props.endFillColor4) !== null && _179 !== void 0 ? _179 : props.endFillColor) !== null && _180 !== void 0 ? _180 : LineDefaults.endFillColor;
483
- var startOpacity4 = (_181 = props.startOpacity4) !== null && _181 !== void 0 ? _181 : startOpacity;
484
- var endOpacity4 = (_182 = props.endOpacity4) !== null && _182 !== void 0 ? _182 : endOpacity;
485
- var startFillColor5 = (_184 = (_183 = props.startFillColor5) !== null && _183 !== void 0 ? _183 : props.startFillColor) !== null && _184 !== void 0 ? _184 : LineDefaults.startFillColor;
486
- var endFillColor5 = (_186 = (_185 = props.endFillColor5) !== null && _185 !== void 0 ? _185 : props.endFillColor) !== null && _186 !== void 0 ? _186 : LineDefaults.endFillColor;
487
- var startOpacity5 = (_187 = props.startOpacity5) !== null && _187 !== void 0 ? _187 : startOpacity;
488
- var endOpacity5 = (_188 = props.endOpacity5) !== null && _188 !== void 0 ? _188 : endOpacity;
489
- defaultArrowConfig.strokeWidth = (_190 = (_189 = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _189 === void 0 ? void 0 : _189.thickness) !== null && _190 !== void 0 ? _190 : thickness1;
490
- defaultArrowConfig.strokeColor = (_192 = (_191 = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _191 === void 0 ? void 0 : _191.color) !== null && _192 !== void 0 ? _192 : color1;
491
- var _359 = getAllArrowProperties(props, defaultArrowConfig), arrowLength1 = _359.arrowLength1, arrowWidth1 = _359.arrowWidth1, arrowStrokeWidth1 = _359.arrowStrokeWidth1, arrowStrokeColor1 = _359.arrowStrokeColor1, arrowFillColor1 = _359.arrowFillColor1, showArrowBase1 = _359.showArrowBase1, arrowLength2 = _359.arrowLength2, arrowWidth2 = _359.arrowWidth2, arrowStrokeWidth2 = _359.arrowStrokeWidth2, arrowStrokeColor2 = _359.arrowStrokeColor2, arrowFillColor2 = _359.arrowFillColor2, showArrowBase2 = _359.showArrowBase2, arrowLength3 = _359.arrowLength3, arrowWidth3 = _359.arrowWidth3, arrowStrokeWidth3 = _359.arrowStrokeWidth3, arrowStrokeColor3 = _359.arrowStrokeColor3, arrowFillColor3 = _359.arrowFillColor3, showArrowBase3 = _359.showArrowBase3, arrowLength4 = _359.arrowLength4, arrowWidth4 = _359.arrowWidth4, arrowStrokeWidth4 = _359.arrowStrokeWidth4, arrowStrokeColor4 = _359.arrowStrokeColor4, arrowFillColor4 = _359.arrowFillColor4, showArrowBase4 = _359.showArrowBase4, arrowLength5 = _359.arrowLength5, arrowWidth5 = _359.arrowWidth5, arrowStrokeWidth5 = _359.arrowStrokeWidth5, arrowStrokeColor5 = _359.arrowStrokeColor5, arrowFillColor5 = _359.arrowFillColor5, showArrowBase5 = _359.showArrowBase5, arrowLengthsFromSet = _359.arrowLengthsFromSet, arrowWidthsFromSet = _359.arrowWidthsFromSet, arrowStrokeWidthsFromSet = _359.arrowStrokeWidthsFromSet, arrowStrokeColorsFromSet = _359.arrowStrokeColorsFromSet, arrowFillColorsFromSet = _359.arrowFillColorsFromSet, showArrowBasesFromSet = _359.showArrowBasesFromSet;
441
+ var showValuesAsDataPointsText = (_116 = props.showValuesAsDataPointsText) !== null && _116 !== void 0 ? _116 : LineDefaults.showValuesAsDataPointsText;
442
+ var thickness1 = (_118 = (_117 = props.thickness1) !== null && _117 !== void 0 ? _117 : props.thickness) !== null && _118 !== void 0 ? _118 : LineDefaults.thickness;
443
+ var thickness2 = (_120 = (_119 = props.thickness2) !== null && _119 !== void 0 ? _119 : props.thickness) !== null && _120 !== void 0 ? _120 : LineDefaults.thickness;
444
+ var thickness3 = (_122 = (_121 = props.thickness3) !== null && _121 !== void 0 ? _121 : props.thickness) !== null && _122 !== void 0 ? _122 : LineDefaults.thickness;
445
+ var thickness4 = (_124 = (_123 = props.thickness4) !== null && _123 !== void 0 ? _123 : props.thickness) !== null && _124 !== void 0 ? _124 : LineDefaults.thickness;
446
+ var thickness5 = (_126 = (_125 = props.thickness5) !== null && _125 !== void 0 ? _125 : props.thickness) !== null && _126 !== void 0 ? _126 : LineDefaults.thickness;
447
+ var zIndex1 = (_127 = props.zIndex1) !== null && _127 !== void 0 ? _127 : 0;
448
+ var zIndex2 = (_128 = props.zIndex2) !== null && _128 !== void 0 ? _128 : 0;
449
+ var zIndex3 = (_129 = props.zIndex3) !== null && _129 !== void 0 ? _129 : 0;
450
+ var zIndex4 = (_130 = props.zIndex4) !== null && _130 !== void 0 ? _130 : 0;
451
+ var zIndex5 = (_131 = props.zIndex5) !== null && _131 !== void 0 ? _131 : 0;
452
+ var strokeDashArray1 = (_132 = props.strokeDashArray1) !== null && _132 !== void 0 ? _132 : props.strokeDashArray;
453
+ var strokeDashArray2 = (_133 = props.strokeDashArray2) !== null && _133 !== void 0 ? _133 : props.strokeDashArray;
454
+ var strokeDashArray3 = (_134 = props.strokeDashArray3) !== null && _134 !== void 0 ? _134 : props.strokeDashArray;
455
+ var strokeDashArray4 = (_135 = props.strokeDashArray4) !== null && _135 !== void 0 ? _135 : props.strokeDashArray;
456
+ var strokeDashArray5 = (_136 = props.strokeDashArray5) !== null && _136 !== void 0 ? _136 : props.strokeDashArray;
457
+ var rotateLabel = (_137 = props.rotateLabel) !== null && _137 !== void 0 ? _137 : false;
458
+ var isAnimated = (_138 = props.isAnimated) !== null && _138 !== void 0 ? _138 : false;
459
+ var hideDataPoints1 = (_140 = (_139 = props.hideDataPoints) !== null && _139 !== void 0 ? _139 : props.hideDataPoints1) !== null && _140 !== void 0 ? _140 : false;
460
+ var hideDataPoints2 = (_142 = (_141 = props.hideDataPoints) !== null && _141 !== void 0 ? _141 : props.hideDataPoints2) !== null && _142 !== void 0 ? _142 : false;
461
+ var hideDataPoints3 = (_144 = (_143 = props.hideDataPoints) !== null && _143 !== void 0 ? _143 : props.hideDataPoints3) !== null && _144 !== void 0 ? _144 : false;
462
+ var hideDataPoints4 = (_146 = (_145 = props.hideDataPoints) !== null && _145 !== void 0 ? _145 : props.hideDataPoints4) !== null && _146 !== void 0 ? _146 : false;
463
+ var hideDataPoints5 = (_148 = (_147 = props.hideDataPoints) !== null && _147 !== void 0 ? _147 : props.hideDataPoints5) !== null && _148 !== void 0 ? _148 : false;
464
+ var color1 = (_150 = (_149 = props.color1) !== null && _149 !== void 0 ? _149 : props.color) !== null && _150 !== void 0 ? _150 : LineDefaults.color;
465
+ var color2 = (_152 = (_151 = props.color2) !== null && _151 !== void 0 ? _151 : props.color) !== null && _152 !== void 0 ? _152 : LineDefaults.color;
466
+ var color3 = (_154 = (_153 = props.color3) !== null && _153 !== void 0 ? _153 : props.color) !== null && _154 !== void 0 ? _154 : LineDefaults.color;
467
+ var color4 = (_156 = (_155 = props.color4) !== null && _155 !== void 0 ? _155 : props.color) !== null && _156 !== void 0 ? _156 : LineDefaults.color;
468
+ var color5 = (_158 = (_157 = props.color5) !== null && _157 !== void 0 ? _157 : props.color) !== null && _158 !== void 0 ? _158 : LineDefaults.color;
469
+ var startFillColor1 = (_160 = (_159 = props.startFillColor1) !== null && _159 !== void 0 ? _159 : props.startFillColor) !== null && _160 !== void 0 ? _160 : LineDefaults.startFillColor;
470
+ var endFillColor1 = (_162 = (_161 = props.endFillColor1) !== null && _161 !== void 0 ? _161 : props.endFillColor) !== null && _162 !== void 0 ? _162 : LineDefaults.endFillColor;
471
+ var startOpacity = (_163 = props.startOpacity) !== null && _163 !== void 0 ? _163 : LineDefaults.startOpacity;
472
+ var endOpacity = (_164 = props.endOpacity) !== null && _164 !== void 0 ? _164 : LineDefaults.endOpacity;
473
+ var startOpacity1 = (_165 = props.startOpacity1) !== null && _165 !== void 0 ? _165 : startOpacity;
474
+ var endOpacity1 = (_166 = props.endOpacity1) !== null && _166 !== void 0 ? _166 : endOpacity;
475
+ var startFillColor2 = (_168 = (_167 = props.startFillColor2) !== null && _167 !== void 0 ? _167 : props.startFillColor) !== null && _168 !== void 0 ? _168 : LineDefaults.startFillColor;
476
+ var endFillColor2 = (_170 = (_169 = props.endFillColor2) !== null && _169 !== void 0 ? _169 : props.endFillColor) !== null && _170 !== void 0 ? _170 : LineDefaults.endFillColor;
477
+ var startOpacity2 = (_171 = props.startOpacity2) !== null && _171 !== void 0 ? _171 : startOpacity;
478
+ var endOpacity2 = (_172 = props.endOpacity2) !== null && _172 !== void 0 ? _172 : endOpacity;
479
+ var startFillColor3 = (_174 = (_173 = props.startFillColor3) !== null && _173 !== void 0 ? _173 : props.startFillColor) !== null && _174 !== void 0 ? _174 : LineDefaults.startFillColor;
480
+ var endFillColor3 = (_176 = (_175 = props.endFillColor3) !== null && _175 !== void 0 ? _175 : props.endFillColor) !== null && _176 !== void 0 ? _176 : LineDefaults.endFillColor;
481
+ var startOpacity3 = (_177 = props.startOpacity3) !== null && _177 !== void 0 ? _177 : startOpacity;
482
+ var endOpacity3 = (_178 = props.endOpacity3) !== null && _178 !== void 0 ? _178 : endOpacity;
483
+ var startFillColor4 = (_180 = (_179 = props.startFillColor4) !== null && _179 !== void 0 ? _179 : props.startFillColor) !== null && _180 !== void 0 ? _180 : LineDefaults.startFillColor;
484
+ var endFillColor4 = (_182 = (_181 = props.endFillColor4) !== null && _181 !== void 0 ? _181 : props.endFillColor) !== null && _182 !== void 0 ? _182 : LineDefaults.endFillColor;
485
+ var startOpacity4 = (_183 = props.startOpacity4) !== null && _183 !== void 0 ? _183 : startOpacity;
486
+ var endOpacity4 = (_184 = props.endOpacity4) !== null && _184 !== void 0 ? _184 : endOpacity;
487
+ var startFillColor5 = (_186 = (_185 = props.startFillColor5) !== null && _185 !== void 0 ? _185 : props.startFillColor) !== null && _186 !== void 0 ? _186 : LineDefaults.startFillColor;
488
+ var endFillColor5 = (_188 = (_187 = props.endFillColor5) !== null && _187 !== void 0 ? _187 : props.endFillColor) !== null && _188 !== void 0 ? _188 : LineDefaults.endFillColor;
489
+ var startOpacity5 = (_189 = props.startOpacity5) !== null && _189 !== void 0 ? _189 : startOpacity;
490
+ var endOpacity5 = (_190 = props.endOpacity5) !== null && _190 !== void 0 ? _190 : endOpacity;
491
+ defaultArrowConfig.strokeWidth = (_192 = (_191 = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _191 === void 0 ? void 0 : _191.thickness) !== null && _192 !== void 0 ? _192 : thickness1;
492
+ defaultArrowConfig.strokeColor = (_194 = (_193 = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _193 === void 0 ? void 0 : _193.color) !== null && _194 !== void 0 ? _194 : color1;
493
+ var _361 = getAllArrowProperties(props, defaultArrowConfig), arrowLength1 = _361.arrowLength1, arrowWidth1 = _361.arrowWidth1, arrowStrokeWidth1 = _361.arrowStrokeWidth1, arrowStrokeColor1 = _361.arrowStrokeColor1, arrowFillColor1 = _361.arrowFillColor1, showArrowBase1 = _361.showArrowBase1, arrowLength2 = _361.arrowLength2, arrowWidth2 = _361.arrowWidth2, arrowStrokeWidth2 = _361.arrowStrokeWidth2, arrowStrokeColor2 = _361.arrowStrokeColor2, arrowFillColor2 = _361.arrowFillColor2, showArrowBase2 = _361.showArrowBase2, arrowLength3 = _361.arrowLength3, arrowWidth3 = _361.arrowWidth3, arrowStrokeWidth3 = _361.arrowStrokeWidth3, arrowStrokeColor3 = _361.arrowStrokeColor3, arrowFillColor3 = _361.arrowFillColor3, showArrowBase3 = _361.showArrowBase3, arrowLength4 = _361.arrowLength4, arrowWidth4 = _361.arrowWidth4, arrowStrokeWidth4 = _361.arrowStrokeWidth4, arrowStrokeColor4 = _361.arrowStrokeColor4, arrowFillColor4 = _361.arrowFillColor4, showArrowBase4 = _361.showArrowBase4, arrowLength5 = _361.arrowLength5, arrowWidth5 = _361.arrowWidth5, arrowStrokeWidth5 = _361.arrowStrokeWidth5, arrowStrokeColor5 = _361.arrowStrokeColor5, arrowFillColor5 = _361.arrowFillColor5, showArrowBase5 = _361.showArrowBase5, arrowLengthsFromSet = _361.arrowLengthsFromSet, arrowWidthsFromSet = _361.arrowWidthsFromSet, arrowStrokeWidthsFromSet = _361.arrowStrokeWidthsFromSet, arrowStrokeColorsFromSet = _361.arrowStrokeColorsFromSet, arrowFillColorsFromSet = _361.arrowFillColorsFromSet, showArrowBasesFromSet = _361.showArrowBasesFromSet;
492
494
  var secondaryLineConfig = {
493
- zIndex: (_194 = (_193 = props.secondaryLineConfig) === null || _193 === void 0 ? void 0 : _193.zIndex) !== null && _194 !== void 0 ? _194 : zIndex1,
494
- curved: (_196 = (_195 = props.secondaryLineConfig) === null || _195 === void 0 ? void 0 : _195.curved) !== null && _196 !== void 0 ? _196 : props.curved,
495
- curvature: (_198 = (_197 = props.secondaryLineConfig) === null || _197 === void 0 ? void 0 : _197.curvature) !== null && _198 !== void 0 ? _198 : curvature,
496
- curveType: (_200 = (_199 = props.secondaryLineConfig) === null || _199 === void 0 ? void 0 : _199.curveType) !== null && _200 !== void 0 ? _200 : curveType,
497
- areaChart: (_202 = (_201 = props.secondaryLineConfig) === null || _201 === void 0 ? void 0 : _201.areaChart) !== null && _202 !== void 0 ? _202 : areaChart,
498
- color: (_204 = (_203 = props.secondaryLineConfig) === null || _203 === void 0 ? void 0 : _203.color) !== null && _204 !== void 0 ? _204 : color1,
499
- thickness: (_206 = (_205 = props.secondaryLineConfig) === null || _205 === void 0 ? void 0 : _205.thickness) !== null && _206 !== void 0 ? _206 : thickness1,
500
- zIndex1: (_208 = (_207 = props.secondaryLineConfig) === null || _207 === void 0 ? void 0 : _207.zIndex1) !== null && _208 !== void 0 ? _208 : zIndex1,
501
- strokeDashArray: (_210 = (_209 = props.secondaryLineConfig) === null || _209 === void 0 ? void 0 : _209.strokeDashArray) !== null && _210 !== void 0 ? _210 : strokeDashArray1,
502
- startIndex: (_212 = (_211 = props.secondaryLineConfig) === null || _211 === void 0 ? void 0 : _211.startIndex) !== null && _212 !== void 0 ? _212 : startIndex1,
503
- endIndex: (_214 = (_213 = props.secondaryLineConfig) === null || _213 === void 0 ? void 0 : _213.endIndex) !== null && _214 !== void 0 ? _214 : endIndex1,
504
- hideDataPoints: (_216 = (_215 = props.secondaryLineConfig) === null || _215 === void 0 ? void 0 : _215.hideDataPoints) !== null && _216 !== void 0 ? _216 : hideDataPoints1,
505
- dataPointsHeight: (_218 = (_217 = props.secondaryLineConfig) === null || _217 === void 0 ? void 0 : _217.dataPointsHeight) !== null && _218 !== void 0 ? _218 : dataPointsHeight1,
506
- dataPointsWidth: (_220 = (_219 = props.secondaryLineConfig) === null || _219 === void 0 ? void 0 : _219.dataPointsWidth) !== null && _220 !== void 0 ? _220 : dataPointsWidth1,
507
- dataPointsRadius: (_222 = (_221 = props.secondaryLineConfig) === null || _221 === void 0 ? void 0 : _221.dataPointsRadius) !== null && _222 !== void 0 ? _222 : dataPointsRadius1,
508
- dataPointsColor: (_224 = (_223 = props.secondaryLineConfig) === null || _223 === void 0 ? void 0 : _223.dataPointsColor) !== null && _224 !== void 0 ? _224 : dataPointsColor1,
509
- dataPointsShape: (_226 = (_225 = props.secondaryLineConfig) === null || _225 === void 0 ? void 0 : _225.dataPointsShape) !== null && _226 !== void 0 ? _226 : dataPointsShape1,
510
- showValuesAsDataPointsText: (_228 = (_227 = props.secondaryLineConfig) === null || _227 === void 0 ? void 0 : _227.showValuesAsDataPointsText) !== null && _228 !== void 0 ? _228 : showValuesAsDataPointsText,
511
- startFillColor: (_230 = (_229 = props.secondaryLineConfig) === null || _229 === void 0 ? void 0 : _229.startFillColor) !== null && _230 !== void 0 ? _230 : startFillColor1,
512
- endFillColor: (_232 = (_231 = props.secondaryLineConfig) === null || _231 === void 0 ? void 0 : _231.endFillColor) !== null && _232 !== void 0 ? _232 : endFillColor1,
513
- startOpacity: (_234 = (_233 = props.secondaryLineConfig) === null || _233 === void 0 ? void 0 : _233.startOpacity) !== null && _234 !== void 0 ? _234 : startOpacity1,
514
- endOpacity: (_236 = (_235 = props.secondaryLineConfig) === null || _235 === void 0 ? void 0 : _235.endOpacity) !== null && _236 !== void 0 ? _236 : endOpacity1,
515
- textFontSize: (_238 = (_237 = props.secondaryLineConfig) === null || _237 === void 0 ? void 0 : _237.textFontSize) !== null && _238 !== void 0 ? _238 : textFontSize1,
516
- textColor: (_240 = (_239 = props.secondaryLineConfig) === null || _239 === void 0 ? void 0 : _239.textColor) !== null && _240 !== void 0 ? _240 : textColor1,
517
- showArrow: (_242 = (_241 = props.secondaryLineConfig) === null || _241 === void 0 ? void 0 : _241.showArrow) !== null && _242 !== void 0 ? _242 : props.showArrows,
518
- arrowConfig: (_244 = (_243 = props.secondaryLineConfig) === null || _243 === void 0 ? void 0 : _243.arrowConfig) !== null && _244 !== void 0 ? _244 : props.arrowConfig
495
+ zIndex: (_196 = (_195 = props.secondaryLineConfig) === null || _195 === void 0 ? void 0 : _195.zIndex) !== null && _196 !== void 0 ? _196 : zIndex1,
496
+ curved: (_198 = (_197 = props.secondaryLineConfig) === null || _197 === void 0 ? void 0 : _197.curved) !== null && _198 !== void 0 ? _198 : props.curved,
497
+ curvature: (_200 = (_199 = props.secondaryLineConfig) === null || _199 === void 0 ? void 0 : _199.curvature) !== null && _200 !== void 0 ? _200 : curvature,
498
+ curveType: (_202 = (_201 = props.secondaryLineConfig) === null || _201 === void 0 ? void 0 : _201.curveType) !== null && _202 !== void 0 ? _202 : curveType,
499
+ areaChart: (_204 = (_203 = props.secondaryLineConfig) === null || _203 === void 0 ? void 0 : _203.areaChart) !== null && _204 !== void 0 ? _204 : areaChart,
500
+ color: (_206 = (_205 = props.secondaryLineConfig) === null || _205 === void 0 ? void 0 : _205.color) !== null && _206 !== void 0 ? _206 : color1,
501
+ thickness: (_208 = (_207 = props.secondaryLineConfig) === null || _207 === void 0 ? void 0 : _207.thickness) !== null && _208 !== void 0 ? _208 : thickness1,
502
+ zIndex1: (_210 = (_209 = props.secondaryLineConfig) === null || _209 === void 0 ? void 0 : _209.zIndex1) !== null && _210 !== void 0 ? _210 : zIndex1,
503
+ strokeDashArray: (_212 = (_211 = props.secondaryLineConfig) === null || _211 === void 0 ? void 0 : _211.strokeDashArray) !== null && _212 !== void 0 ? _212 : strokeDashArray1,
504
+ startIndex: (_214 = (_213 = props.secondaryLineConfig) === null || _213 === void 0 ? void 0 : _213.startIndex) !== null && _214 !== void 0 ? _214 : startIndex1,
505
+ endIndex: (_216 = (_215 = props.secondaryLineConfig) === null || _215 === void 0 ? void 0 : _215.endIndex) !== null && _216 !== void 0 ? _216 : endIndex1,
506
+ hideDataPoints: (_218 = (_217 = props.secondaryLineConfig) === null || _217 === void 0 ? void 0 : _217.hideDataPoints) !== null && _218 !== void 0 ? _218 : hideDataPoints1,
507
+ dataPointsHeight: (_220 = (_219 = props.secondaryLineConfig) === null || _219 === void 0 ? void 0 : _219.dataPointsHeight) !== null && _220 !== void 0 ? _220 : dataPointsHeight1,
508
+ dataPointsWidth: (_222 = (_221 = props.secondaryLineConfig) === null || _221 === void 0 ? void 0 : _221.dataPointsWidth) !== null && _222 !== void 0 ? _222 : dataPointsWidth1,
509
+ dataPointsRadius: (_224 = (_223 = props.secondaryLineConfig) === null || _223 === void 0 ? void 0 : _223.dataPointsRadius) !== null && _224 !== void 0 ? _224 : dataPointsRadius1,
510
+ dataPointsColor: (_226 = (_225 = props.secondaryLineConfig) === null || _225 === void 0 ? void 0 : _225.dataPointsColor) !== null && _226 !== void 0 ? _226 : dataPointsColor1,
511
+ dataPointsShape: (_228 = (_227 = props.secondaryLineConfig) === null || _227 === void 0 ? void 0 : _227.dataPointsShape) !== null && _228 !== void 0 ? _228 : dataPointsShape1,
512
+ showValuesAsDataPointsText: (_230 = (_229 = props.secondaryLineConfig) === null || _229 === void 0 ? void 0 : _229.showValuesAsDataPointsText) !== null && _230 !== void 0 ? _230 : showValuesAsDataPointsText,
513
+ startFillColor: (_232 = (_231 = props.secondaryLineConfig) === null || _231 === void 0 ? void 0 : _231.startFillColor) !== null && _232 !== void 0 ? _232 : startFillColor1,
514
+ endFillColor: (_234 = (_233 = props.secondaryLineConfig) === null || _233 === void 0 ? void 0 : _233.endFillColor) !== null && _234 !== void 0 ? _234 : endFillColor1,
515
+ startOpacity: (_236 = (_235 = props.secondaryLineConfig) === null || _235 === void 0 ? void 0 : _235.startOpacity) !== null && _236 !== void 0 ? _236 : startOpacity1,
516
+ endOpacity: (_238 = (_237 = props.secondaryLineConfig) === null || _237 === void 0 ? void 0 : _237.endOpacity) !== null && _238 !== void 0 ? _238 : endOpacity1,
517
+ textFontSize: (_240 = (_239 = props.secondaryLineConfig) === null || _239 === void 0 ? void 0 : _239.textFontSize) !== null && _240 !== void 0 ? _240 : textFontSize1,
518
+ textColor: (_242 = (_241 = props.secondaryLineConfig) === null || _241 === void 0 ? void 0 : _241.textColor) !== null && _242 !== void 0 ? _242 : textColor1,
519
+ showArrow: (_244 = (_243 = props.secondaryLineConfig) === null || _243 === void 0 ? void 0 : _243.showArrow) !== null && _244 !== void 0 ? _244 : props.showArrows,
520
+ arrowConfig: (_246 = (_245 = props.secondaryLineConfig) === null || _245 === void 0 ? void 0 : _245.arrowConfig) !== null && _246 !== void 0 ? _246 : props.arrowConfig
519
521
  };
520
522
  var yAxisExtraHeightAtTop = props.trimYAxisAtTop
521
523
  ? 0
522
- : (_245 = props.yAxisExtraHeight) !== null && _245 !== void 0 ? _245 : containerHeight / 20;
524
+ : (_247 = props.yAxisExtraHeight) !== null && _247 !== void 0 ? _247 : containerHeight / 20;
523
525
  var addLeadingAndTrailingPathForAreaFill = function (initialPath, value, dataLength) {
524
526
  return ('M ' +
525
527
  initialSpacing +
@@ -1058,90 +1060,90 @@ export var useLineChart = function (props) {
1058
1060
  }
1059
1061
  }
1060
1062
  }, [secondaryData, secondaryLineConfig]);
1061
- var gradientDirection = (_246 = props.gradientDirection) !== null && _246 !== void 0 ? _246 : 'vertical';
1063
+ var gradientDirection = (_248 = props.gradientDirection) !== null && _248 !== void 0 ? _248 : 'vertical';
1062
1064
  var horizSections = [{ value: '0' }];
1063
- var stepHeight = (_247 = props.stepHeight) !== null && _247 !== void 0 ? _247 : containerHeight / noOfSections;
1064
- var stepValue = (_248 = props.stepValue) !== null && _248 !== void 0 ? _248 : maxValue / noOfSections;
1065
- var noOfSectionsBelowXAxis = (_249 = props.noOfSectionsBelowXAxis) !== null && _249 !== void 0 ? _249 : Math.round(Math.ceil(-mostNegativeValue / stepValue));
1065
+ var stepHeight = (_249 = props.stepHeight) !== null && _249 !== void 0 ? _249 : containerHeight / noOfSections;
1066
+ var stepValue = (_250 = props.stepValue) !== null && _250 !== void 0 ? _250 : maxValue / noOfSections;
1067
+ var noOfSectionsBelowXAxis = (_251 = props.noOfSectionsBelowXAxis) !== null && _251 !== void 0 ? _251 : Math.round(Math.ceil(-mostNegativeValue / stepValue));
1066
1068
  var axesAndRulesProps = getAxesAndRulesProps(props, containerHeight, stepHeight, stepValue, noOfSections, roundToDigits, negativeStepValue !== null && negativeStepValue !== void 0 ? negativeStepValue : stepValue, secondaryMaxValue, secondaryMinItem, showSecondaryFractionalValues, secondaryRoundToDigits);
1067
1069
  var secondaryNoOfSectionsBelowXAxis = axesAndRulesProps.secondaryYAxisConfig.noOfSectionsBelowXAxis;
1068
1070
  var containerHeightIncludingBelowXAxis = extendedContainerHeight +
1069
1071
  Math.max(noOfSectionsBelowXAxis, secondaryNoOfSectionsBelowXAxis) *
1070
1072
  stepHeight;
1071
- var showXAxisIndices = (_250 = props.showXAxisIndices) !== null && _250 !== void 0 ? _250 : AxesAndRulesDefaults.showXAxisIndices;
1072
- var xAxisIndicesHeight = (_251 = props.xAxisIndicesHeight) !== null && _251 !== void 0 ? _251 : AxesAndRulesDefaults.xAxisIndicesHeight;
1073
- var xAxisIndicesWidth = (_252 = props.xAxisIndicesWidth) !== null && _252 !== void 0 ? _252 : AxesAndRulesDefaults.xAxisIndicesWidth;
1074
- var xAxisIndicesColor = (_253 = props.xAxisIndicesColor) !== null && _253 !== void 0 ? _253 : AxesAndRulesDefaults.xAxisIndicesColor;
1075
- var xAxisTextNumberOfLines = (_254 = props.xAxisTextNumberOfLines) !== null && _254 !== void 0 ? _254 : AxesAndRulesDefaults.xAxisTextNumberOfLines;
1076
- var xAxisLabelsVerticalShift = (_255 = props.xAxisLabelsVerticalShift) !== null && _255 !== void 0 ? _255 : AxesAndRulesDefaults.xAxisLabelsVerticalShift;
1073
+ var showXAxisIndices = (_252 = props.showXAxisIndices) !== null && _252 !== void 0 ? _252 : AxesAndRulesDefaults.showXAxisIndices;
1074
+ var xAxisIndicesHeight = (_253 = props.xAxisIndicesHeight) !== null && _253 !== void 0 ? _253 : AxesAndRulesDefaults.xAxisIndicesHeight;
1075
+ var xAxisIndicesWidth = (_254 = props.xAxisIndicesWidth) !== null && _254 !== void 0 ? _254 : AxesAndRulesDefaults.xAxisIndicesWidth;
1076
+ var xAxisIndicesColor = (_255 = props.xAxisIndicesColor) !== null && _255 !== void 0 ? _255 : AxesAndRulesDefaults.xAxisIndicesColor;
1077
+ var xAxisTextNumberOfLines = (_256 = props.xAxisTextNumberOfLines) !== null && _256 !== void 0 ? _256 : AxesAndRulesDefaults.xAxisTextNumberOfLines;
1078
+ var xAxisLabelsVerticalShift = (_257 = props.xAxisLabelsVerticalShift) !== null && _257 !== void 0 ? _257 : AxesAndRulesDefaults.xAxisLabelsVerticalShift;
1077
1079
  var horizontalRulesStyle = props.horizontalRulesStyle;
1078
1080
  var horizontal = false;
1079
1081
  var yAxisAtTop = false;
1080
1082
  defaultPointerConfig.pointerStripHeight =
1081
1083
  containerHeight + noOfSectionsBelowXAxis * stepHeight;
1082
1084
  var pointerConfig = props.pointerConfig;
1083
- var getPointerProps = (_256 = props.getPointerProps) !== null && _256 !== void 0 ? _256 : null;
1084
- var pointerHeight = (_257 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.height) !== null && _257 !== void 0 ? _257 : defaultPointerConfig.height;
1085
- var pointerWidth = (_258 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.width) !== null && _258 !== void 0 ? _258 : defaultPointerConfig.width;
1086
- var pointerRadius = (_259 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.radius) !== null && _259 !== void 0 ? _259 : defaultPointerConfig.radius;
1087
- var pointerColor = (_260 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColor) !== null && _260 !== void 0 ? _260 : defaultPointerConfig.pointerColor;
1088
- var pointerComponent = (_261 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerComponent) !== null && _261 !== void 0 ? _261 : defaultPointerConfig.pointerComponent;
1085
+ var getPointerProps = (_258 = props.getPointerProps) !== null && _258 !== void 0 ? _258 : null;
1086
+ var pointerHeight = (_259 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.height) !== null && _259 !== void 0 ? _259 : defaultPointerConfig.height;
1087
+ var pointerWidth = (_260 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.width) !== null && _260 !== void 0 ? _260 : defaultPointerConfig.width;
1088
+ var pointerRadius = (_261 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.radius) !== null && _261 !== void 0 ? _261 : defaultPointerConfig.radius;
1089
+ var pointerColor = (_262 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColor) !== null && _262 !== void 0 ? _262 : defaultPointerConfig.pointerColor;
1090
+ var pointerComponent = (_263 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerComponent) !== null && _263 !== void 0 ? _263 : defaultPointerConfig.pointerComponent;
1089
1091
  var showPointerStrip = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.showPointerStrip) === false
1090
1092
  ? false
1091
1093
  : defaultPointerConfig.showPointerStrip;
1092
- var pointerStripHeight = (_262 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripHeight) !== null && _262 !== void 0 ? _262 : defaultPointerConfig.pointerStripHeight;
1093
- var pointerStripWidth = (_263 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripWidth) !== null && _263 !== void 0 ? _263 : defaultPointerConfig.pointerStripWidth;
1094
- var pointerStripColor = (_264 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripColor) !== null && _264 !== void 0 ? _264 : defaultPointerConfig.pointerStripColor;
1095
- var pointerStripUptoDataPoint = (_265 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripUptoDataPoint) !== null && _265 !== void 0 ? _265 : defaultPointerConfig.pointerStripUptoDataPoint;
1096
- var pointerLabelComponent = (_266 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelComponent) !== null && _266 !== void 0 ? _266 : defaultPointerConfig.pointerLabelComponent;
1097
- var stripOverPointer = (_267 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripOverPointer) !== null && _267 !== void 0 ? _267 : defaultPointerConfig.stripOverPointer;
1098
- var shiftPointerLabelX = (_268 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelX) !== null && _268 !== void 0 ? _268 : defaultPointerConfig.shiftPointerLabelX;
1099
- var shiftPointerLabelY = (_269 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelY) !== null && _269 !== void 0 ? _269 : defaultPointerConfig.shiftPointerLabelY;
1100
- var pointerLabelWidth = (_270 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelWidth) !== null && _270 !== void 0 ? _270 : defaultPointerConfig.pointerLabelWidth;
1101
- var pointerLabelHeight = (_271 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelHeight) !== null && _271 !== void 0 ? _271 : defaultPointerConfig.pointerLabelHeight;
1102
- var autoAdjustPointerLabelPosition = (_272 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.autoAdjustPointerLabelPosition) !== null && _272 !== void 0 ? _272 : defaultPointerConfig.autoAdjustPointerLabelPosition;
1103
- var pointerVanishDelay = (_273 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerVanishDelay) !== null && _273 !== void 0 ? _273 : defaultPointerConfig.pointerVanishDelay;
1104
- var activatePointersOnLongPress = (_274 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersOnLongPress) !== null && _274 !== void 0 ? _274 : defaultPointerConfig.activatePointersOnLongPress;
1105
- var activatePointersInstantlyOnTouch = (_275 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersInstantlyOnTouch) !== null && _275 !== void 0 ? _275 : defaultPointerConfig.activatePointersInstantlyOnTouch;
1106
- var activatePointersDelay = (_276 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersDelay) !== null && _276 !== void 0 ? _276 : defaultPointerConfig.activatePointersDelay;
1107
- var initialPointerIndex = (_277 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerIndex) !== null && _277 !== void 0 ? _277 : defaultPointerConfig.initialPointerIndex;
1108
- var initialPointerAppearDelay = (_278 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerAppearDelay) !== null && _278 !== void 0 ? _278 : (isAnimated
1094
+ var pointerStripHeight = (_264 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripHeight) !== null && _264 !== void 0 ? _264 : defaultPointerConfig.pointerStripHeight;
1095
+ var pointerStripWidth = (_265 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripWidth) !== null && _265 !== void 0 ? _265 : defaultPointerConfig.pointerStripWidth;
1096
+ var pointerStripColor = (_266 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripColor) !== null && _266 !== void 0 ? _266 : defaultPointerConfig.pointerStripColor;
1097
+ var pointerStripUptoDataPoint = (_267 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripUptoDataPoint) !== null && _267 !== void 0 ? _267 : defaultPointerConfig.pointerStripUptoDataPoint;
1098
+ var pointerLabelComponent = (_268 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelComponent) !== null && _268 !== void 0 ? _268 : defaultPointerConfig.pointerLabelComponent;
1099
+ var stripOverPointer = (_269 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripOverPointer) !== null && _269 !== void 0 ? _269 : defaultPointerConfig.stripOverPointer;
1100
+ var shiftPointerLabelX = (_270 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelX) !== null && _270 !== void 0 ? _270 : defaultPointerConfig.shiftPointerLabelX;
1101
+ var shiftPointerLabelY = (_271 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelY) !== null && _271 !== void 0 ? _271 : defaultPointerConfig.shiftPointerLabelY;
1102
+ var pointerLabelWidth = (_272 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelWidth) !== null && _272 !== void 0 ? _272 : defaultPointerConfig.pointerLabelWidth;
1103
+ var pointerLabelHeight = (_273 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelHeight) !== null && _273 !== void 0 ? _273 : defaultPointerConfig.pointerLabelHeight;
1104
+ var autoAdjustPointerLabelPosition = (_274 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.autoAdjustPointerLabelPosition) !== null && _274 !== void 0 ? _274 : defaultPointerConfig.autoAdjustPointerLabelPosition;
1105
+ var pointerVanishDelay = (_275 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerVanishDelay) !== null && _275 !== void 0 ? _275 : defaultPointerConfig.pointerVanishDelay;
1106
+ var activatePointersOnLongPress = (_276 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersOnLongPress) !== null && _276 !== void 0 ? _276 : defaultPointerConfig.activatePointersOnLongPress;
1107
+ var activatePointersInstantlyOnTouch = (_277 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersInstantlyOnTouch) !== null && _277 !== void 0 ? _277 : defaultPointerConfig.activatePointersInstantlyOnTouch;
1108
+ var activatePointersDelay = (_278 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersDelay) !== null && _278 !== void 0 ? _278 : defaultPointerConfig.activatePointersDelay;
1109
+ var initialPointerIndex = (_279 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerIndex) !== null && _279 !== void 0 ? _279 : defaultPointerConfig.initialPointerIndex;
1110
+ var initialPointerAppearDelay = (_280 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerAppearDelay) !== null && _280 !== void 0 ? _280 : (isAnimated
1109
1111
  ? animationDuration
1110
1112
  : defaultPointerConfig.initialPointerAppearDelay);
1111
- var persistPointer = (_279 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.persistPointer) !== null && _279 !== void 0 ? _279 : defaultPointerConfig.persistPointer;
1112
- var resetPointerIndexOnRelease = (_280 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.resetPointerIndexOnRelease) !== null && _280 !== void 0 ? _280 : defaultPointerConfig.resetPointerIndexOnRelease;
1113
- var hidePointers = (_281 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointers) !== null && _281 !== void 0 ? _281 : defaultPointerConfig.hidePointers;
1114
- var hidePointer1 = (_282 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer1) !== null && _282 !== void 0 ? _282 : defaultPointerConfig.hidePointer1;
1115
- var hidePointer2 = (_283 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer2) !== null && _283 !== void 0 ? _283 : defaultPointerConfig.hidePointer2;
1116
- var hidePointer3 = (_284 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer3) !== null && _284 !== void 0 ? _284 : defaultPointerConfig.hidePointer3;
1117
- var hidePointer4 = (_285 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer4) !== null && _285 !== void 0 ? _285 : defaultPointerConfig.hidePointer4;
1118
- var hidePointer5 = (_286 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer5) !== null && _286 !== void 0 ? _286 : defaultPointerConfig.hidePointer5;
1119
- var hideSecondaryPointer = (_287 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hideSecondaryPointer) !== null && _287 !== void 0 ? _287 : defaultPointerConfig.hideSecondaryPointer;
1120
- var resetPointerOnDataChange = (_288 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.resetPointerOnDataChange) !== null && _288 !== void 0 ? _288 : defaultPointerConfig.resetPointerOnDataChange;
1121
- var hidePointerDataPointForMissingValues = (_289 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointerDataPointForMissingValues) !== null && _289 !== void 0 ? _289 : ((pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointerForMissingValues) ? true : false);
1113
+ var persistPointer = (_281 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.persistPointer) !== null && _281 !== void 0 ? _281 : defaultPointerConfig.persistPointer;
1114
+ var resetPointerIndexOnRelease = (_282 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.resetPointerIndexOnRelease) !== null && _282 !== void 0 ? _282 : defaultPointerConfig.resetPointerIndexOnRelease;
1115
+ var hidePointers = (_283 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointers) !== null && _283 !== void 0 ? _283 : defaultPointerConfig.hidePointers;
1116
+ var hidePointer1 = (_284 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer1) !== null && _284 !== void 0 ? _284 : defaultPointerConfig.hidePointer1;
1117
+ var hidePointer2 = (_285 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer2) !== null && _285 !== void 0 ? _285 : defaultPointerConfig.hidePointer2;
1118
+ var hidePointer3 = (_286 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer3) !== null && _286 !== void 0 ? _286 : defaultPointerConfig.hidePointer3;
1119
+ var hidePointer4 = (_287 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer4) !== null && _287 !== void 0 ? _287 : defaultPointerConfig.hidePointer4;
1120
+ var hidePointer5 = (_288 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer5) !== null && _288 !== void 0 ? _288 : defaultPointerConfig.hidePointer5;
1121
+ var hideSecondaryPointer = (_289 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hideSecondaryPointer) !== null && _289 !== void 0 ? _289 : defaultPointerConfig.hideSecondaryPointer;
1122
+ var resetPointerOnDataChange = (_290 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.resetPointerOnDataChange) !== null && _290 !== void 0 ? _290 : defaultPointerConfig.resetPointerOnDataChange;
1123
+ var hidePointerDataPointForMissingValues = (_291 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointerDataPointForMissingValues) !== null && _291 !== void 0 ? _291 : ((pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointerForMissingValues) ? true : false);
1122
1124
  var pointerEvents = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerEvents;
1123
- var disableScroll = (_290 = props.disableScroll) !== null && _290 !== void 0 ? _290 : (pointerConfig
1125
+ var disableScroll = (_292 = props.disableScroll) !== null && _292 !== void 0 ? _292 : (pointerConfig
1124
1126
  ? activatePointersOnLongPress
1125
1127
  ? !!responderActive
1126
1128
  : true
1127
1129
  : false);
1128
- var showScrollIndicator = (_291 = props.showScrollIndicator) !== null && _291 !== void 0 ? _291 : LineDefaults.showScrollIndicator;
1129
- var focusEnabled = (_292 = props.focusEnabled) !== null && _292 !== void 0 ? _292 : LineDefaults.focusEnabled;
1130
- var showDataPointOnFocus = (_293 = props.showDataPointOnFocus) !== null && _293 !== void 0 ? _293 : LineDefaults.showDataPointOnFocus;
1131
- var showStripOnFocus = (_294 = props.showStripOnFocus) !== null && _294 !== void 0 ? _294 : LineDefaults.showStripOnFocus;
1132
- var showTextOnFocus = (_295 = props.showTextOnFocus) !== null && _295 !== void 0 ? _295 : LineDefaults.showTextOnFocus;
1133
- var showDataPointLabelOnFocus = (_296 = props.showDataPointLabelOnFocus) !== null && _296 !== void 0 ? _296 : LineDefaults.showDataPointLabelOnFocus;
1130
+ var showScrollIndicator = (_293 = props.showScrollIndicator) !== null && _293 !== void 0 ? _293 : LineDefaults.showScrollIndicator;
1131
+ var focusEnabled = (_294 = props.focusEnabled) !== null && _294 !== void 0 ? _294 : LineDefaults.focusEnabled;
1132
+ var showDataPointOnFocus = (_295 = props.showDataPointOnFocus) !== null && _295 !== void 0 ? _295 : LineDefaults.showDataPointOnFocus;
1133
+ var showStripOnFocus = (_296 = props.showStripOnFocus) !== null && _296 !== void 0 ? _296 : LineDefaults.showStripOnFocus;
1134
+ var showTextOnFocus = (_297 = props.showTextOnFocus) !== null && _297 !== void 0 ? _297 : LineDefaults.showTextOnFocus;
1135
+ var showDataPointLabelOnFocus = (_298 = props.showDataPointLabelOnFocus) !== null && _298 !== void 0 ? _298 : LineDefaults.showDataPointLabelOnFocus;
1134
1136
  var stripHeight = props.stripHeight;
1135
- var stripWidth = (_297 = props.stripWidth) !== null && _297 !== void 0 ? _297 : LineDefaults.stripWidth;
1136
- var stripColor = (_298 = props.stripColor) !== null && _298 !== void 0 ? _298 : color1;
1137
- var stripOpacity = (_299 = props.stripOpacity) !== null && _299 !== void 0 ? _299 : (startOpacity1 + endOpacity1) / 2;
1137
+ var stripWidth = (_299 = props.stripWidth) !== null && _299 !== void 0 ? _299 : LineDefaults.stripWidth;
1138
+ var stripColor = (_300 = props.stripColor) !== null && _300 !== void 0 ? _300 : color1;
1139
+ var stripOpacity = (_301 = props.stripOpacity) !== null && _301 !== void 0 ? _301 : (startOpacity1 + endOpacity1) / 2;
1138
1140
  var stripStrokeDashArray = props.stripStrokeDashArray;
1139
- var unFocusOnPressOut = (_300 = props.unFocusOnPressOut) !== null && _300 !== void 0 ? _300 : LineDefaults.unFocusOnPressOut;
1140
- var delayBeforeUnFocus = (_301 = props.delayBeforeUnFocus) !== null && _301 !== void 0 ? _301 : LineDefaults.delayBeforeUnFocus;
1141
- var lineGradient = (_302 = props.lineGradient) !== null && _302 !== void 0 ? _302 : LineDefaults.lineGradient;
1142
- var lineGradientDirection = (_303 = props.lineGradientDirection) !== null && _303 !== void 0 ? _303 : 'vertical';
1143
- var lineGradientStartColor = (_304 = props.lineGradientStartColor) !== null && _304 !== void 0 ? _304 : LineDefaults.lineGradientStartColor;
1144
- var lineGradientEndColor = (_305 = props.lineGradientEndColor) !== null && _305 !== void 0 ? _305 : LineDefaults.lineGradientEndColor;
1141
+ var unFocusOnPressOut = (_302 = props.unFocusOnPressOut) !== null && _302 !== void 0 ? _302 : LineDefaults.unFocusOnPressOut;
1142
+ var delayBeforeUnFocus = (_303 = props.delayBeforeUnFocus) !== null && _303 !== void 0 ? _303 : LineDefaults.delayBeforeUnFocus;
1143
+ var lineGradient = (_304 = props.lineGradient) !== null && _304 !== void 0 ? _304 : LineDefaults.lineGradient;
1144
+ var lineGradientDirection = (_305 = props.lineGradientDirection) !== null && _305 !== void 0 ? _305 : 'vertical';
1145
+ var lineGradientStartColor = (_306 = props.lineGradientStartColor) !== null && _306 !== void 0 ? _306 : LineDefaults.lineGradientStartColor;
1146
+ var lineGradientEndColor = (_307 = props.lineGradientEndColor) !== null && _307 !== void 0 ? _307 : LineDefaults.lineGradientEndColor;
1145
1147
  var getPointerY = function (value) {
1146
1148
  return value
1147
1149
  ? containerHeight -
@@ -1212,8 +1214,8 @@ export var useLineChart = function (props) {
1212
1214
  var initialPointerYs = (_a = dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) { return getPointerY(set.data[initialPointerIndex].value); })) !== null && _a !== void 0 ? _a : [];
1213
1215
  setPointerYsForDataSet(initialPointerYs);
1214
1216
  };
1215
- var dataPointsRadius = (_307 = (_306 = props.dataPointsRadius1) !== null && _306 !== void 0 ? _306 : props.dataPointsRadius) !== null && _307 !== void 0 ? _307 : LineDefaults.dataPointsRadius;
1216
- var dataPointsWidth = (_309 = (_308 = props.dataPointsWidth1) !== null && _308 !== void 0 ? _308 : props.dataPointsWidth) !== null && _309 !== void 0 ? _309 : LineDefaults.dataPointsWidth;
1217
+ var dataPointsRadius = (_309 = (_308 = props.dataPointsRadius1) !== null && _308 !== void 0 ? _308 : props.dataPointsRadius) !== null && _309 !== void 0 ? _309 : LineDefaults.dataPointsRadius;
1218
+ var dataPointsWidth = (_311 = (_310 = props.dataPointsWidth1) !== null && _310 !== void 0 ? _310 : props.dataPointsWidth) !== null && _311 !== void 0 ? _311 : LineDefaults.dataPointsWidth;
1217
1219
  var extraWidthDueToDataPoint = props.hideDataPoints
1218
1220
  ? 0
1219
1221
  : dataPointsRadius !== null && dataPointsRadius !== void 0 ? dataPointsRadius : dataPointsWidth;
@@ -1281,7 +1283,7 @@ export var useLineChart = function (props) {
1281
1283
  pointerY: pointerY,
1282
1284
  onEndReached: props.onEndReached,
1283
1285
  onStartReached: props.onStartReached,
1284
- endReachedOffset: (_310 = props.endReachedOffset) !== null && _310 !== void 0 ? _310 : LineDefaults.endReachedOffset,
1286
+ endReachedOffset: (_312 = props.endReachedOffset) !== null && _312 !== void 0 ? _312 : LineDefaults.endReachedOffset,
1285
1287
  onMomentumScrollEnd: props.onMomentumScrollEnd,
1286
1288
  extraWidthDueToDataPoint: extraWidthDueToDataPoint,
1287
1289
  customBackground: props.customBackground
@@ -1390,6 +1392,7 @@ export var useLineChart = function (props) {
1390
1392
  animationDuration: animationDuration,
1391
1393
  onDataChangeAnimationDuration: onDataChangeAnimationDuration,
1392
1394
  animateTogether: animateTogether,
1395
+ renderDataPointsAfterAnimationEnds: renderDataPointsAfterAnimationEnds,
1393
1396
  animateOnDataChange: animateOnDataChange,
1394
1397
  startIndex1: startIndex1,
1395
1398
  startIndex2: startIndex2,
@@ -1651,8 +1654,8 @@ export var useLineChart = function (props) {
1651
1654
  stripOverDataPoints: props.stripOverDataPoints,
1652
1655
  strips: strips,
1653
1656
  lastLineNumber: lastLineNumber,
1654
- focusTogether: (_311 = props.focusTogether) !== null && _311 !== void 0 ? _311 : true,
1655
- focusProximity: (_312 = props.focusProximity) !== null && _312 !== void 0 ? _312 : Infinity
1657
+ focusTogether: (_313 = props.focusTogether) !== null && _313 !== void 0 ? _313 : true,
1658
+ focusProximity: (_314 = props.focusProximity) !== null && _314 !== void 0 ? _314 : Infinity
1656
1659
  // oldPoints
1657
1660
  };
1658
1661
  };