gifted-charts-core 0.0.17 → 0.0.19

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.
Files changed (43) hide show
  1. package/index.ts +136 -0
  2. package/package.json +3 -6
  3. package/src/LineChart/index.ts +22 -22
  4. package/src/PieChart/types.ts +6 -4
  5. package/index.js +0 -133
  6. package/src/BarChart/Animated2DWithGradient.js +0 -106
  7. package/src/BarChart/Animated2DWithGradient.js.map +0 -1
  8. package/src/BarChart/RenderStackBars.js +0 -97
  9. package/src/BarChart/RenderStackBars.js.map +0 -1
  10. package/src/BarChart/index.js +0 -599
  11. package/src/BarChart/index.js.map +0 -1
  12. package/src/BarChart/types.js +0 -10
  13. package/src/BarChart/types.js.map +0 -1
  14. package/src/LineChart/LineChartBiColor.js +0 -512
  15. package/src/LineChart/LineChartBiColor.js.map +0 -1
  16. package/src/LineChart/index.js +0 -1484
  17. package/src/LineChart/index.js.map +0 -1
  18. package/src/LineChart/types.js +0 -10
  19. package/src/LineChart/types.js.map +0 -1
  20. package/src/PieChart/index.js +0 -118
  21. package/src/PieChart/index.js.map +0 -1
  22. package/src/PieChart/main.js +0 -178
  23. package/src/PieChart/main.js.map +0 -1
  24. package/src/PieChart/types.js +0 -10
  25. package/src/PieChart/types.js.map +0 -1
  26. package/src/PopulationPyramid/index.js +0 -204
  27. package/src/PopulationPyramid/index.js.map +0 -1
  28. package/src/PopulationPyramid/types.js +0 -10
  29. package/src/PopulationPyramid/types.js.map +0 -1
  30. package/src/components/AnimatedThreeDBar/index.js +0 -55
  31. package/src/components/AnimatedThreeDBar/index.js.map +0 -1
  32. package/src/components/BarAndLineChartsWrapper/getHorizSectionsVals.js +0 -233
  33. package/src/components/BarAndLineChartsWrapper/getHorizSectionsVals.js.map +0 -1
  34. package/src/components/BarAndLineChartsWrapper/index.js +0 -269
  35. package/src/components/BarAndLineChartsWrapper/index.js.map +0 -1
  36. package/src/components/common/StripAndLabel.js +0 -69
  37. package/src/components/common/StripAndLabel.js.map +0 -1
  38. package/src/utils/constants.js +0 -315
  39. package/src/utils/constants.js.map +0 -1
  40. package/src/utils/index.js +0 -946
  41. package/src/utils/index.js.map +0 -1
  42. package/src/utils/types.js +0 -20
  43. package/src/utils/types.js.map +0 -1
@@ -1,1484 +0,0 @@
1
- System.register(["react", "../utils/constants", "../utils", "../utils/types"], function (exports_1, context_1) {
2
- "use strict";
3
- var __assign = (this && this.__assign) || function () {
4
- __assign = Object.assign || function(t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
- t[p] = s[p];
9
- }
10
- return t;
11
- };
12
- return __assign.apply(this, arguments);
13
- };
14
- var react_1, constants_1, utils_1, types_1, useLineChart;
15
- var __moduleName = context_1 && context_1.id;
16
- return {
17
- setters: [
18
- function (react_1_1) {
19
- react_1 = react_1_1;
20
- },
21
- function (constants_1_1) {
22
- constants_1 = constants_1_1;
23
- },
24
- function (utils_1_1) {
25
- utils_1 = utils_1_1;
26
- },
27
- function (types_1_1) {
28
- types_1 = types_1_1;
29
- }
30
- ],
31
- execute: function () {
32
- exports_1("useLineChart", useLineChart = function (props) {
33
- 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;
34
- var animations = props.animations, showDataPointsForMissingValues = props.showDataPointsForMissingValues, _267 = props.interpolateMissingValues, interpolateMissingValues = _267 === void 0 ? true : _267, onlyPositive = props.onlyPositive;
35
- var curvature = (_a = props.curvature) !== null && _a !== void 0 ? _a : constants_1.LineDefaults.curvature;
36
- var curveType = (_b = props.curveType) !== null && _b !== void 0 ? _b : constants_1.LineDefaults.curveType;
37
- var _268 = react_1.useState(0), scrollX = _268[0], setScrollX = _268[1];
38
- var _269 = react_1.useState(""), arrow1Points = _269[0], setArrow1Points = _269[1];
39
- var _270 = react_1.useState(""), arrow2Points = _270[0], setArrow2Points = _270[1];
40
- var _271 = react_1.useState(""), arrow3Points = _271[0], setArrow3Points = _271[1];
41
- var _272 = react_1.useState(""), arrow4Points = _272[0], setArrow4Points = _272[1];
42
- var _273 = react_1.useState(""), arrow5Points = _273[0], setArrow5Points = _273[1];
43
- var _274 = react_1.useState(""), secondaryArrowPoints = _274[0], setSecondaryArrowPoints = _274[1];
44
- var _275 = react_1.useState(-1), pointerIndex = _275[0], setPointerIndex = _275[1];
45
- var _276 = react_1.useState(0), pointerX = _276[0], setPointerX = _276[1];
46
- var _277 = react_1.useState(0), pointerY = _277[0], setPointerY = _277[1];
47
- var _278 = react_1.useState({
48
- pointerShiftX: 0,
49
- pointerShiftY: 0,
50
- }), pointerItem = _278[0], setPointerItem = _278[1];
51
- var _279 = react_1.useState(0), pointerY2 = _279[0], setPointerY2 = _279[1];
52
- var _280 = react_1.useState({
53
- pointerShiftX: 0,
54
- pointerShiftY: 0,
55
- }), pointerItem2 = _280[0], setPointerItem2 = _280[1];
56
- var _281 = react_1.useState(0), pointerY3 = _281[0], setPointerY3 = _281[1];
57
- var _282 = react_1.useState({
58
- pointerShiftX: 0,
59
- pointerShiftY: 0,
60
- }), pointerItem3 = _282[0], setPointerItem3 = _282[1];
61
- var _283 = react_1.useState(0), pointerY4 = _283[0], setPointerY4 = _283[1];
62
- var _284 = react_1.useState({
63
- pointerShiftX: 0,
64
- pointerShiftY: 0,
65
- }), pointerItem4 = _284[0], setPointerItem4 = _284[1];
66
- var _285 = react_1.useState(0), pointerY5 = _285[0], setPointerY5 = _285[1];
67
- var _286 = react_1.useState({
68
- pointerShiftX: 0,
69
- pointerShiftY: 0,
70
- }), pointerItem5 = _286[0], setPointerItem5 = _286[1];
71
- var _287 = react_1.useState(0), secondaryPointerY = _287[0], setSecondaryPointerY = _287[1];
72
- var _288 = react_1.useState({
73
- pointerShiftX: 0,
74
- pointerShiftY: 0,
75
- }), secondaryPointerItem = _288[0], setSecondaryPointerItem = _288[1];
76
- var _289 = react_1.useState(0), responderStartTime = _289[0], setResponderStartTime = _289[1];
77
- var _290 = react_1.useState(false), responderActive = _290[0], setResponderActive = _290[1];
78
- var _291 = react_1.useState(""), points = _291[0], setPoints = _291[1];
79
- var _292 = react_1.useState(""), points2 = _292[0], setPoints2 = _292[1];
80
- var _293 = react_1.useState(""), points3 = _293[0], setPoints3 = _293[1];
81
- var _294 = react_1.useState(""), points4 = _294[0], setPoints4 = _294[1];
82
- var _295 = react_1.useState(""), points5 = _295[0], setPoints5 = _295[1];
83
- var _296 = react_1.useState(""), secondaryPoints = _296[0], setSecondaryPoints = _296[1];
84
- var _297 = react_1.useState(""), fillPoints = _297[0], setFillPoints = _297[1];
85
- var _298 = react_1.useState(""), fillPoints2 = _298[0], setFillPoints2 = _298[1];
86
- var _299 = react_1.useState(""), fillPoints3 = _299[0], setFillPoints3 = _299[1];
87
- var _300 = react_1.useState(""), fillPoints4 = _300[0], setFillPoints4 = _300[1];
88
- var _301 = react_1.useState(""), fillPoints5 = _301[0], setFillPoints5 = _301[1];
89
- var _302 = react_1.useState(""), secondaryFillPoints = _302[0], setSecondaryFillPoints = _302[1];
90
- var _303 = react_1.useState([]), pointsFromSet = _303[0], setPointsFromSet = _303[1];
91
- var _304 = react_1.useState([]), fillPointsFromSet = _304[0], setFillPointsFromSet = _304[1];
92
- var _305 = react_1.useState([]), arrowPointsFromSet = _305[0], setArrowPointsFromSet = _305[1];
93
- var _306 = react_1.useState(-1), selectedIndex = _306[0], setSelectedIndex = _306[1];
94
- var noOfSections = utils_1.getNoOfSections(props.noOfSections, props.maxValue, props.stepValue);
95
- var containerHeight = (_c = props.height) !== null && _c !== void 0 ? _c : (((_d = props.stepHeight) !== null && _d !== void 0 ? _d : 0) * noOfSections ||
96
- constants_1.AxesAndRulesDefaults.containerHeight);
97
- var data = react_1.useMemo(function () {
98
- if (!props.data) {
99
- return [];
100
- }
101
- var nullishHandledData = utils_1.getInterpolatedData(props.data, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive);
102
- if (props.yAxisOffset) {
103
- return nullishHandledData.map(function (item) {
104
- var _a;
105
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
106
- return item;
107
- });
108
- }
109
- return nullishHandledData;
110
- }, [props.yAxisOffset, props.data]);
111
- var data2 = react_1.useMemo(function () {
112
- if (!props.data2) {
113
- return [];
114
- }
115
- var nullishHandledData = utils_1.getInterpolatedData(props.data2, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive);
116
- if (props.yAxisOffset) {
117
- return nullishHandledData.map(function (item) {
118
- var _a;
119
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
120
- return item;
121
- });
122
- }
123
- return nullishHandledData;
124
- }, [props.yAxisOffset, props.data2]);
125
- var data3 = react_1.useMemo(function () {
126
- if (!props.data3) {
127
- return [];
128
- }
129
- var nullishHandledData = utils_1.getInterpolatedData(props.data3, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive);
130
- if (props.yAxisOffset) {
131
- return nullishHandledData.map(function (item) {
132
- var _a;
133
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
134
- return item;
135
- });
136
- }
137
- return nullishHandledData;
138
- }, [props.yAxisOffset, props.data3]);
139
- var data4 = react_1.useMemo(function () {
140
- if (!props.data4) {
141
- return [];
142
- }
143
- var nullishHandledData = utils_1.getInterpolatedData(props.data4, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive);
144
- if (props.yAxisOffset) {
145
- return nullishHandledData.map(function (item) {
146
- var _a;
147
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
148
- return item;
149
- });
150
- }
151
- return nullishHandledData;
152
- }, [props.yAxisOffset, props.data4]);
153
- var data5 = react_1.useMemo(function () {
154
- if (!props.data5) {
155
- return [];
156
- }
157
- var nullishHandledData = utils_1.getInterpolatedData(props.data5, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive);
158
- if (props.yAxisOffset) {
159
- return nullishHandledData.map(function (item) {
160
- var _a;
161
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
162
- return item;
163
- });
164
- }
165
- return nullishHandledData;
166
- }, [props.yAxisOffset, props.data5]);
167
- var secondaryData = utils_1.getSecondaryDataWithOffsetIncluded(props.secondaryData, props.secondaryYAxis, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive) || [];
168
- var dataSet = props.dataSet;
169
- if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
170
- dataSet = dataSet.map(function (dataSetItem) { return (__assign(__assign({}, dataSetItem), { data: utils_1.getInterpolatedData(dataSetItem.data, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive) })); });
171
- }
172
- var data0 = react_1.useMemo(function () {
173
- var _a, _b, _c;
174
- if (props.yAxisOffset) {
175
- return (_a = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _a === void 0 ? void 0 : _a.data;
176
- }
177
- else {
178
- return (_c = (_b = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.map(function (item) {
179
- var _a;
180
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
181
- return item;
182
- });
183
- }
184
- }, [props.yAxisOffset, dataSet]);
185
- var scrollToEnd = props.scrollToEnd || constants_1.LineDefaults.scrollToEnd;
186
- var scrollAnimation = (_e = props.scrollAnimation) !== null && _e !== void 0 ? _e : constants_1.LineDefaults.scrollAnimation;
187
- var scrollEventThrottle = (_f = props.scrollEventThrottle) !== null && _f !== void 0 ? _f : constants_1.LineDefaults.scrollEventThrottle;
188
- var labelsExtraHeight = props.labelsExtraHeight || 0;
189
- var animationDuration = props.animationDuration || constants_1.LineDefaults.animationDuration;
190
- var onDataChangeAnimationDuration = props.onDataChangeAnimationDuration || 400;
191
- var animateTogether = props.animateTogether || constants_1.LineDefaults.animateTogether;
192
- var animateOnDataChange = props.yAxisOffset
193
- ? false
194
- : props.animateOnDataChange || false;
195
- var startIndex1 = (_h = (_g = props.startIndex1) !== null && _g !== void 0 ? _g : props.startIndex) !== null && _h !== void 0 ? _h : 0;
196
- var endIndex1;
197
- if (props.endIndex1 === undefined || props.endIndex1 === null) {
198
- if (props.endIndex === undefined || props.endIndex === null) {
199
- endIndex1 = data.length - 1;
200
- }
201
- else {
202
- endIndex1 = props.endIndex;
203
- }
204
- }
205
- else {
206
- endIndex1 = props.endIndex1;
207
- }
208
- var startIndex2 = props.startIndex2 || 0;
209
- var endIndex2 = (_j = props.endIndex2) !== null && _j !== void 0 ? _j : data2.length - 1;
210
- var startIndex3 = props.startIndex3 || 0;
211
- var endIndex3 = (_k = props.endIndex3) !== null && _k !== void 0 ? _k : data3.length - 1;
212
- var startIndex4 = props.startIndex4 || 0;
213
- var endIndex4 = (_l = props.endIndex4) !== null && _l !== void 0 ? _l : data4.length - 1;
214
- var startIndex5 = props.startIndex5 || 0;
215
- var endIndex5 = (_m = props.endIndex5) !== null && _m !== void 0 ? _m : data5.length - 1;
216
- var lineSegments = !interpolateMissingValues
217
- ? utils_1.getLineSegmentsForMissingValues(props.data)
218
- : props.lineSegments;
219
- var lineSegments2 = !interpolateMissingValues
220
- ? utils_1.getLineSegmentsForMissingValues(props.data2)
221
- : props.lineSegments2;
222
- var lineSegments3 = !interpolateMissingValues
223
- ? utils_1.getLineSegmentsForMissingValues(props.data3)
224
- : props.lineSegments3;
225
- var lineSegments4 = !interpolateMissingValues
226
- ? utils_1.getLineSegmentsForMissingValues(props.data4)
227
- : props.lineSegments4;
228
- var lineSegments5 = !interpolateMissingValues
229
- ? utils_1.getLineSegmentsForMissingValues(props.data5)
230
- : props.lineSegments5;
231
- var highlightedRange = props.highlightedRange;
232
- var newPoints = "", newFillPoints = "";
233
- var counter = 0;
234
- var adjustToWidth = props.adjustToWidth || false;
235
- var initialSpacing = (_o = props.initialSpacing) !== null && _o !== void 0 ? _o : constants_1.LineDefaults.initialSpacing;
236
- var endSpacing = (_p = props.endSpacing) !== null && _p !== void 0 ? _p : (adjustToWidth ? 0 : constants_1.LineDefaults.endSpacing);
237
- var thickness = (_q = props.thickness) !== null && _q !== void 0 ? _q : constants_1.LineDefaults.thickness;
238
- var yAxisLabelWidth = (_r = props.yAxisLabelWidth) !== null && _r !== void 0 ? _r : (props.hideYAxisText
239
- ? constants_1.AxesAndRulesDefaults.yAxisEmptyLabelWidth
240
- : constants_1.AxesAndRulesDefaults.yAxisLabelWidth);
241
- var spacing = (_s = props.spacing) !== null && _s !== void 0 ? _s : (adjustToWidth
242
- ? (((_t = props.width) !== null && _t !== void 0 ? _t : constants_1.screenWidth - yAxisLabelWidth) - initialSpacing) /
243
- Math.max((data0 !== null && data0 !== void 0 ? data0 : data).length - 1, 1)
244
- : constants_1.LineDefaults.spacing);
245
- var xAxisThickness = (_u = props.xAxisThickness) !== null && _u !== void 0 ? _u : constants_1.AxesAndRulesDefaults.xAxisThickness;
246
- var dataPointsHeight1 = (_w = (_v = props.dataPointsHeight1) !== null && _v !== void 0 ? _v : props.dataPointsHeight) !== null && _w !== void 0 ? _w : constants_1.LineDefaults.dataPointsHeight;
247
- var dataPointsWidth1 = (_y = (_x = props.dataPointsWidth1) !== null && _x !== void 0 ? _x : props.dataPointsWidth) !== null && _y !== void 0 ? _y : constants_1.LineDefaults.dataPointsWidth;
248
- var dataPointsRadius1 = (_0 = (_z = props.dataPointsRadius1) !== null && _z !== void 0 ? _z : props.dataPointsRadius) !== null && _0 !== void 0 ? _0 : constants_1.LineDefaults.dataPointsRadius;
249
- var dataPointsColor1 = (_2 = (_1 = props.dataPointsColor1) !== null && _1 !== void 0 ? _1 : props.dataPointsColor) !== null && _2 !== void 0 ? _2 : constants_1.LineDefaults.dataPointsColor;
250
- var dataPointsShape1 = (_4 = (_3 = props.dataPointsShape1) !== null && _3 !== void 0 ? _3 : props.dataPointsShape) !== null && _4 !== void 0 ? _4 : constants_1.LineDefaults.dataPointsShape;
251
- var dataPointsHeight2 = (_6 = (_5 = props.dataPointsHeight2) !== null && _5 !== void 0 ? _5 : props.dataPointsHeight) !== null && _6 !== void 0 ? _6 : constants_1.LineDefaults.dataPointsHeight;
252
- var dataPointsWidth2 = (_8 = (_7 = props.dataPointsWidth2) !== null && _7 !== void 0 ? _7 : props.dataPointsWidth) !== null && _8 !== void 0 ? _8 : constants_1.LineDefaults.dataPointsWidth;
253
- var dataPointsRadius2 = (_10 = (_9 = props.dataPointsRadius2) !== null && _9 !== void 0 ? _9 : props.dataPointsRadius) !== null && _10 !== void 0 ? _10 : constants_1.LineDefaults.dataPointsRadius;
254
- var dataPointsColor2 = (_12 = (_11 = props.dataPointsColor2) !== null && _11 !== void 0 ? _11 : props.dataPointsColor) !== null && _12 !== void 0 ? _12 : constants_1.LineDefaults.dataPointsColor2;
255
- var dataPointsShape2 = (_14 = (_13 = props.dataPointsShape2) !== null && _13 !== void 0 ? _13 : props.dataPointsShape) !== null && _14 !== void 0 ? _14 : constants_1.LineDefaults.dataPointsShape;
256
- var dataPointsHeight3 = (_16 = (_15 = props.dataPointsHeight3) !== null && _15 !== void 0 ? _15 : props.dataPointsHeight) !== null && _16 !== void 0 ? _16 : constants_1.LineDefaults.dataPointsHeight;
257
- var dataPointsWidth3 = (_18 = (_17 = props.dataPointsWidth3) !== null && _17 !== void 0 ? _17 : props.dataPointsWidth) !== null && _18 !== void 0 ? _18 : constants_1.LineDefaults.dataPointsWidth;
258
- var dataPointsRadius3 = (_20 = (_19 = props.dataPointsRadius3) !== null && _19 !== void 0 ? _19 : props.dataPointsRadius) !== null && _20 !== void 0 ? _20 : constants_1.LineDefaults.dataPointsRadius;
259
- var dataPointsColor3 = (_22 = (_21 = props.dataPointsColor3) !== null && _21 !== void 0 ? _21 : props.dataPointsColor) !== null && _22 !== void 0 ? _22 : constants_1.LineDefaults.dataPointsColor3;
260
- var dataPointsShape3 = (_24 = (_23 = props.dataPointsShape3) !== null && _23 !== void 0 ? _23 : props.dataPointsShape) !== null && _24 !== void 0 ? _24 : constants_1.LineDefaults.dataPointsShape;
261
- var dataPointsHeight4 = (_26 = (_25 = props.dataPointsHeight4) !== null && _25 !== void 0 ? _25 : props.dataPointsHeight) !== null && _26 !== void 0 ? _26 : constants_1.LineDefaults.dataPointsHeight;
262
- var dataPointsWidth4 = (_28 = (_27 = props.dataPointsWidth4) !== null && _27 !== void 0 ? _27 : props.dataPointsWidth) !== null && _28 !== void 0 ? _28 : constants_1.LineDefaults.dataPointsWidth;
263
- var dataPointsRadius4 = (_30 = (_29 = props.dataPointsRadius4) !== null && _29 !== void 0 ? _29 : props.dataPointsRadius) !== null && _30 !== void 0 ? _30 : constants_1.LineDefaults.dataPointsRadius;
264
- var dataPointsColor4 = (_32 = (_31 = props.dataPointsColor4) !== null && _31 !== void 0 ? _31 : props.dataPointsColor) !== null && _32 !== void 0 ? _32 : constants_1.LineDefaults.dataPointsColor;
265
- var dataPointsShape4 = (_34 = (_33 = props.dataPointsShape4) !== null && _33 !== void 0 ? _33 : props.dataPointsShape) !== null && _34 !== void 0 ? _34 : constants_1.LineDefaults.dataPointsShape;
266
- var dataPointsHeight5 = (_36 = (_35 = props.dataPointsHeight5) !== null && _35 !== void 0 ? _35 : props.dataPointsHeight) !== null && _36 !== void 0 ? _36 : constants_1.LineDefaults.dataPointsHeight;
267
- var dataPointsWidth5 = (_38 = (_37 = props.dataPointsWidth5) !== null && _37 !== void 0 ? _37 : props.dataPointsWidth) !== null && _38 !== void 0 ? _38 : constants_1.LineDefaults.dataPointsWidth;
268
- var dataPointsRadius5 = (_40 = (_39 = props.dataPointsRadius5) !== null && _39 !== void 0 ? _39 : props.dataPointsRadius) !== null && _40 !== void 0 ? _40 : constants_1.LineDefaults.dataPointsRadius;
269
- var dataPointsColor5 = (_42 = (_41 = props.dataPointsColor5) !== null && _41 !== void 0 ? _41 : props.dataPointsColor) !== null && _42 !== void 0 ? _42 : constants_1.LineDefaults.dataPointsColor;
270
- var dataPointsShape5 = (_44 = (_43 = props.dataPointsShape5) !== null && _43 !== void 0 ? _43 : props.dataPointsShape) !== null && _44 !== void 0 ? _44 : constants_1.LineDefaults.dataPointsShape;
271
- var areaChart = (_45 = props.areaChart) !== null && _45 !== void 0 ? _45 : false;
272
- var areaChart1 = (_46 = props.areaChart1) !== null && _46 !== void 0 ? _46 : false;
273
- var areaChart2 = (_47 = props.areaChart2) !== null && _47 !== void 0 ? _47 : false;
274
- var areaChart3 = (_48 = props.areaChart3) !== null && _48 !== void 0 ? _48 : false;
275
- var areaChart4 = (_49 = props.areaChart4) !== null && _49 !== void 0 ? _49 : false;
276
- var areaChart5 = (_50 = props.areaChart5) !== null && _50 !== void 0 ? _50 : false;
277
- var atLeastOneAreaChart = (dataSet === null || dataSet === void 0 ? void 0 : dataSet.some(function (set) { return set.areaChart; })) ||
278
- areaChart ||
279
- areaChart1 ||
280
- areaChart2 ||
281
- areaChart3 ||
282
- areaChart4 ||
283
- areaChart5;
284
- var stepChart = (_51 = props.stepChart) !== null && _51 !== void 0 ? _51 : false;
285
- var stepChart1 = (_52 = props.stepChart1) !== null && _52 !== void 0 ? _52 : false;
286
- var stepChart2 = (_53 = props.stepChart2) !== null && _53 !== void 0 ? _53 : false;
287
- var stepChart3 = (_54 = props.stepChart3) !== null && _54 !== void 0 ? _54 : false;
288
- var stepChart4 = (_55 = props.stepChart4) !== null && _55 !== void 0 ? _55 : false;
289
- var stepChart5 = (_56 = props.stepChart5) !== null && _56 !== void 0 ? _56 : false;
290
- var edgePosition = (_57 = props.edgePosition) !== null && _57 !== void 0 ? _57 : constants_1.LineDefaults.edgePosition;
291
- var textFontSize1 = (_59 = (_58 = props.textFontSize1) !== null && _58 !== void 0 ? _58 : props.textFontSize) !== null && _59 !== void 0 ? _59 : constants_1.LineDefaults.textFontSize;
292
- var textFontSize2 = (_61 = (_60 = props.textFontSize2) !== null && _60 !== void 0 ? _60 : props.textFontSize) !== null && _61 !== void 0 ? _61 : constants_1.LineDefaults.textFontSize;
293
- var textFontSize3 = (_63 = (_62 = props.textFontSize3) !== null && _62 !== void 0 ? _62 : props.textFontSize) !== null && _63 !== void 0 ? _63 : constants_1.LineDefaults.textFontSize;
294
- var textFontSize4 = (_65 = (_64 = props.textFontSize4) !== null && _64 !== void 0 ? _64 : props.textFontSize) !== null && _65 !== void 0 ? _65 : constants_1.LineDefaults.textFontSize;
295
- var textFontSize5 = (_67 = (_66 = props.textFontSize5) !== null && _66 !== void 0 ? _66 : props.textFontSize) !== null && _67 !== void 0 ? _67 : constants_1.LineDefaults.textFontSize;
296
- var textColor1 = (_69 = (_68 = props.textColor1) !== null && _68 !== void 0 ? _68 : props.textColor) !== null && _69 !== void 0 ? _69 : constants_1.LineDefaults.textColor;
297
- var textColor2 = (_71 = (_70 = props.textColor2) !== null && _70 !== void 0 ? _70 : props.textColor) !== null && _71 !== void 0 ? _71 : constants_1.LineDefaults.textColor;
298
- var textColor3 = (_73 = (_72 = props.textColor3) !== null && _72 !== void 0 ? _72 : props.textColor) !== null && _73 !== void 0 ? _73 : constants_1.LineDefaults.textColor;
299
- var textColor4 = (_75 = (_74 = props.textColor4) !== null && _74 !== void 0 ? _74 : props.textColor) !== null && _75 !== void 0 ? _75 : constants_1.LineDefaults.textColor;
300
- var textColor5 = (_77 = (_76 = props.textColor5) !== null && _76 !== void 0 ? _76 : props.textColor) !== null && _77 !== void 0 ? _77 : constants_1.LineDefaults.textColor;
301
- var totalWidth = initialSpacing + spacing * (data0 !== null && data0 !== void 0 ? data0 : data).length;
302
- var _307 = utils_1.computeMaxAndMinItems(data0 !== null && data0 !== void 0 ? data0 : data, props.roundToDigits, props.showFractionalValues), maxItem = _307.maxItem, minItem = _307.minItem;
303
- var maxValue = utils_1.getMaxValue(props.maxValue, props.stepValue, noOfSections, maxItem);
304
- var mostNegativeValue = props.mostNegativeValue || minItem;
305
- var overflowTop = (_78 = props.overflowTop) !== null && _78 !== void 0 ? _78 : 0;
306
- var extendedContainerHeight = utils_1.getExtendedContainerHeightWithPadding(containerHeight, overflowTop);
307
- var getX = function (index) { return initialSpacing + spacing * index - 1; };
308
- var getY = function (value) {
309
- return extendedContainerHeight - (value * containerHeight) / maxValue;
310
- };
311
- var secondaryMaxItem = utils_1.computeMaxAndMinItems(secondaryData, (_79 = props.secondaryYAxis) === null || _79 === void 0 ? void 0 : _79.roundToDigits, (_80 = props.secondaryYAxis) === null || _80 === void 0 ? void 0 : _80.showFractionalValues).maxItem;
312
- var secondaryMaxValue = (_82 = (_81 = props.secondaryYAxis) === null || _81 === void 0 ? void 0 : _81.maxValue) !== null && _82 !== void 0 ? _82 : (secondaryMaxItem || maxValue);
313
- var getSecondaryY = function (value) {
314
- return extendedContainerHeight - (value * containerHeight) / secondaryMaxValue;
315
- };
316
- var heightUptoXaxis = extendedContainerHeight - xAxisThickness;
317
- if (animateOnDataChange) {
318
- animations.forEach(function (item, index) {
319
- item.addListener(function (val) {
320
- var _a, _b, _c, _d, _e;
321
- var temp = (_b = (_a = data[index]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0;
322
- data[index].value = val.value;
323
- var pp = "", ppp = "";
324
- if (!((_c = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0].curved) !== null && _c !== void 0 ? _c : props.curved)) {
325
- for (var i = 0; i < (data0 !== null && data0 !== void 0 ? data0 : data).length; i++) {
326
- pp += "L" + getX(i) + " " + getY((data0 !== null && data0 !== void 0 ? data0 : data)[i].value) + " ";
327
- }
328
- if ((_e = (_d = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _d === void 0 ? void 0 : _d.areaChart) !== null && _e !== void 0 ? _e : areaChart) {
329
- ppp = "L" + initialSpacing + " " + heightUptoXaxis + " ";
330
- ppp += pp;
331
- ppp +=
332
- "L" +
333
- (initialSpacing + spacing * (data.length - 1)) +
334
- " " +
335
- heightUptoXaxis;
336
- ppp += "L" + initialSpacing + " " + heightUptoXaxis + " ";
337
- }
338
- newPoints = pp;
339
- newFillPoints = ppp;
340
- setPointsOnChange();
341
- }
342
- counter++;
343
- data[index].value = temp;
344
- });
345
- });
346
- }
347
- var setPointsOnChange = function () {
348
- if (counter === data.length) {
349
- if (!props.curved) {
350
- setPoints(newPoints.replace("L", "M"));
351
- if (areaChart) {
352
- setFillPoints(newFillPoints.replace("L", "M"));
353
- }
354
- }
355
- }
356
- };
357
- var showValuesAsDataPointsText = (_83 = props.showValuesAsDataPointsText) !== null && _83 !== void 0 ? _83 : constants_1.LineDefaults.showValuesAsDataPointsText;
358
- var thickness1 = (_85 = (_84 = props.thickness1) !== null && _84 !== void 0 ? _84 : props.thickness) !== null && _85 !== void 0 ? _85 : constants_1.LineDefaults.thickness;
359
- var thickness2 = (_87 = (_86 = props.thickness2) !== null && _86 !== void 0 ? _86 : props.thickness) !== null && _87 !== void 0 ? _87 : constants_1.LineDefaults.thickness;
360
- var thickness3 = (_89 = (_88 = props.thickness3) !== null && _88 !== void 0 ? _88 : props.thickness) !== null && _89 !== void 0 ? _89 : constants_1.LineDefaults.thickness;
361
- var thickness4 = (_91 = (_90 = props.thickness4) !== null && _90 !== void 0 ? _90 : props.thickness) !== null && _91 !== void 0 ? _91 : constants_1.LineDefaults.thickness;
362
- var thickness5 = (_93 = (_92 = props.thickness5) !== null && _92 !== void 0 ? _92 : props.thickness) !== null && _93 !== void 0 ? _93 : constants_1.LineDefaults.thickness;
363
- var zIndex1 = (_94 = props.zIndex1) !== null && _94 !== void 0 ? _94 : 0;
364
- var zIndex2 = (_95 = props.zIndex2) !== null && _95 !== void 0 ? _95 : 0;
365
- var zIndex3 = (_96 = props.zIndex3) !== null && _96 !== void 0 ? _96 : 0;
366
- var zIndex4 = (_97 = props.zIndex4) !== null && _97 !== void 0 ? _97 : 0;
367
- var zIndex5 = (_98 = props.zIndex5) !== null && _98 !== void 0 ? _98 : 0;
368
- var strokeDashArray1 = (_99 = props.strokeDashArray1) !== null && _99 !== void 0 ? _99 : props.strokeDashArray;
369
- var strokeDashArray2 = (_100 = props.strokeDashArray2) !== null && _100 !== void 0 ? _100 : props.strokeDashArray;
370
- var strokeDashArray3 = (_101 = props.strokeDashArray3) !== null && _101 !== void 0 ? _101 : props.strokeDashArray;
371
- var strokeDashArray4 = (_102 = props.strokeDashArray4) !== null && _102 !== void 0 ? _102 : props.strokeDashArray;
372
- var strokeDashArray5 = (_103 = props.strokeDashArray5) !== null && _103 !== void 0 ? _103 : props.strokeDashArray;
373
- var rotateLabel = (_104 = props.rotateLabel) !== null && _104 !== void 0 ? _104 : false;
374
- var isAnimated = (_105 = props.isAnimated) !== null && _105 !== void 0 ? _105 : false;
375
- var hideDataPoints1 = (_107 = (_106 = props.hideDataPoints) !== null && _106 !== void 0 ? _106 : props.hideDataPoints1) !== null && _107 !== void 0 ? _107 : false;
376
- var hideDataPoints2 = (_109 = (_108 = props.hideDataPoints) !== null && _108 !== void 0 ? _108 : props.hideDataPoints2) !== null && _109 !== void 0 ? _109 : false;
377
- var hideDataPoints3 = (_111 = (_110 = props.hideDataPoints) !== null && _110 !== void 0 ? _110 : props.hideDataPoints3) !== null && _111 !== void 0 ? _111 : false;
378
- var hideDataPoints4 = (_113 = (_112 = props.hideDataPoints) !== null && _112 !== void 0 ? _112 : props.hideDataPoints4) !== null && _113 !== void 0 ? _113 : false;
379
- var hideDataPoints5 = (_115 = (_114 = props.hideDataPoints) !== null && _114 !== void 0 ? _114 : props.hideDataPoints5) !== null && _115 !== void 0 ? _115 : false;
380
- var color1 = (_117 = (_116 = props.color1) !== null && _116 !== void 0 ? _116 : props.color) !== null && _117 !== void 0 ? _117 : constants_1.LineDefaults.color;
381
- var color2 = (_119 = (_118 = props.color2) !== null && _118 !== void 0 ? _118 : props.color) !== null && _119 !== void 0 ? _119 : constants_1.LineDefaults.color;
382
- var color3 = (_121 = (_120 = props.color3) !== null && _120 !== void 0 ? _120 : props.color) !== null && _121 !== void 0 ? _121 : constants_1.LineDefaults.color;
383
- var color4 = (_123 = (_122 = props.color4) !== null && _122 !== void 0 ? _122 : props.color) !== null && _123 !== void 0 ? _123 : constants_1.LineDefaults.color;
384
- var color5 = (_125 = (_124 = props.color5) !== null && _124 !== void 0 ? _124 : props.color) !== null && _125 !== void 0 ? _125 : constants_1.LineDefaults.color;
385
- var startFillColor1 = (_127 = (_126 = props.startFillColor1) !== null && _126 !== void 0 ? _126 : props.startFillColor) !== null && _127 !== void 0 ? _127 : constants_1.LineDefaults.startFillColor;
386
- var endFillColor1 = (_129 = (_128 = props.endFillColor1) !== null && _128 !== void 0 ? _128 : props.endFillColor) !== null && _129 !== void 0 ? _129 : constants_1.LineDefaults.endFillColor;
387
- var startOpacity = (_130 = props.startOpacity) !== null && _130 !== void 0 ? _130 : constants_1.LineDefaults.startOpacity;
388
- var endOpacity = (_131 = props.endOpacity) !== null && _131 !== void 0 ? _131 : constants_1.LineDefaults.endOpacity;
389
- var startOpacity1 = (_132 = props.startOpacity1) !== null && _132 !== void 0 ? _132 : startOpacity;
390
- var endOpacity1 = (_133 = props.endOpacity1) !== null && _133 !== void 0 ? _133 : endOpacity;
391
- var startFillColor2 = (_135 = (_134 = props.startFillColor2) !== null && _134 !== void 0 ? _134 : props.startFillColor) !== null && _135 !== void 0 ? _135 : constants_1.LineDefaults.startFillColor;
392
- var endFillColor2 = (_137 = (_136 = props.endFillColor2) !== null && _136 !== void 0 ? _136 : props.endFillColor) !== null && _137 !== void 0 ? _137 : constants_1.LineDefaults.endFillColor;
393
- var startOpacity2 = (_138 = props.startOpacity2) !== null && _138 !== void 0 ? _138 : startOpacity;
394
- var endOpacity2 = (_139 = props.endOpacity2) !== null && _139 !== void 0 ? _139 : endOpacity;
395
- var startFillColor3 = (_141 = (_140 = props.startFillColor3) !== null && _140 !== void 0 ? _140 : props.startFillColor) !== null && _141 !== void 0 ? _141 : constants_1.LineDefaults.startFillColor;
396
- var endFillColor3 = (_143 = (_142 = props.endFillColor3) !== null && _142 !== void 0 ? _142 : props.endFillColor) !== null && _143 !== void 0 ? _143 : constants_1.LineDefaults.endFillColor;
397
- var startOpacity3 = (_144 = props.startOpacity3) !== null && _144 !== void 0 ? _144 : startOpacity;
398
- var endOpacity3 = (_145 = props.endOpacity3) !== null && _145 !== void 0 ? _145 : endOpacity;
399
- var startFillColor4 = (_147 = (_146 = props.startFillColor4) !== null && _146 !== void 0 ? _146 : props.startFillColor) !== null && _147 !== void 0 ? _147 : constants_1.LineDefaults.startFillColor;
400
- var endFillColor4 = (_149 = (_148 = props.endFillColor4) !== null && _148 !== void 0 ? _148 : props.endFillColor) !== null && _149 !== void 0 ? _149 : constants_1.LineDefaults.endFillColor;
401
- var startOpacity4 = (_150 = props.startOpacity4) !== null && _150 !== void 0 ? _150 : startOpacity;
402
- var endOpacity4 = (_151 = props.endOpacity4) !== null && _151 !== void 0 ? _151 : endOpacity;
403
- var startFillColor5 = (_153 = (_152 = props.startFillColor5) !== null && _152 !== void 0 ? _152 : props.startFillColor) !== null && _153 !== void 0 ? _153 : constants_1.LineDefaults.startFillColor;
404
- var endFillColor5 = (_155 = (_154 = props.endFillColor5) !== null && _154 !== void 0 ? _154 : props.endFillColor) !== null && _155 !== void 0 ? _155 : constants_1.LineDefaults.endFillColor;
405
- var startOpacity5 = (_156 = props.startOpacity5) !== null && _156 !== void 0 ? _156 : startOpacity;
406
- var endOpacity5 = (_157 = props.endOpacity5) !== null && _157 !== void 0 ? _157 : endOpacity;
407
- constants_1.defaultArrowConfig.strokeWidth = (_159 = (_158 = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _158 === void 0 ? void 0 : _158.thickness) !== null && _159 !== void 0 ? _159 : thickness1;
408
- constants_1.defaultArrowConfig.strokeColor = (_161 = (_160 = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _160 === void 0 ? void 0 : _160.color) !== null && _161 !== void 0 ? _161 : color1;
409
- var _308 = utils_1.getAllArrowProperties(props, constants_1.defaultArrowConfig), arrowLength1 = _308.arrowLength1, arrowWidth1 = _308.arrowWidth1, arrowStrokeWidth1 = _308.arrowStrokeWidth1, arrowStrokeColor1 = _308.arrowStrokeColor1, arrowFillColor1 = _308.arrowFillColor1, showArrowBase1 = _308.showArrowBase1, arrowLength2 = _308.arrowLength2, arrowWidth2 = _308.arrowWidth2, arrowStrokeWidth2 = _308.arrowStrokeWidth2, arrowStrokeColor2 = _308.arrowStrokeColor2, arrowFillColor2 = _308.arrowFillColor2, showArrowBase2 = _308.showArrowBase2, arrowLength3 = _308.arrowLength3, arrowWidth3 = _308.arrowWidth3, arrowStrokeWidth3 = _308.arrowStrokeWidth3, arrowStrokeColor3 = _308.arrowStrokeColor3, arrowFillColor3 = _308.arrowFillColor3, showArrowBase3 = _308.showArrowBase3, arrowLength4 = _308.arrowLength4, arrowWidth4 = _308.arrowWidth4, arrowStrokeWidth4 = _308.arrowStrokeWidth4, arrowStrokeColor4 = _308.arrowStrokeColor4, arrowFillColor4 = _308.arrowFillColor4, showArrowBase4 = _308.showArrowBase4, arrowLength5 = _308.arrowLength5, arrowWidth5 = _308.arrowWidth5, arrowStrokeWidth5 = _308.arrowStrokeWidth5, arrowStrokeColor5 = _308.arrowStrokeColor5, arrowFillColor5 = _308.arrowFillColor5, showArrowBase5 = _308.showArrowBase5, arrowLengthsFromSet = _308.arrowLengthsFromSet, arrowWidthsFromSet = _308.arrowWidthsFromSet, arrowStrokeWidthsFromSet = _308.arrowStrokeWidthsFromSet, arrowStrokeColorsFromSet = _308.arrowStrokeColorsFromSet, arrowFillColorsFromSet = _308.arrowFillColorsFromSet, showArrowBasesFromSet = _308.showArrowBasesFromSet;
410
- var secondaryLineConfig = {
411
- zIndex: (_163 = (_162 = props.secondaryLineConfig) === null || _162 === void 0 ? void 0 : _162.zIndex) !== null && _163 !== void 0 ? _163 : zIndex1,
412
- curved: (_165 = (_164 = props.secondaryLineConfig) === null || _164 === void 0 ? void 0 : _164.curved) !== null && _165 !== void 0 ? _165 : props.curved,
413
- curvature: (_167 = (_166 = props.secondaryLineConfig) === null || _166 === void 0 ? void 0 : _166.curvature) !== null && _167 !== void 0 ? _167 : curvature,
414
- curveType: (_169 = (_168 = props.secondaryLineConfig) === null || _168 === void 0 ? void 0 : _168.curveType) !== null && _169 !== void 0 ? _169 : curveType,
415
- areaChart: (_171 = (_170 = props.secondaryLineConfig) === null || _170 === void 0 ? void 0 : _170.areaChart) !== null && _171 !== void 0 ? _171 : areaChart,
416
- color: (_173 = (_172 = props.secondaryLineConfig) === null || _172 === void 0 ? void 0 : _172.color) !== null && _173 !== void 0 ? _173 : color1,
417
- thickness: (_175 = (_174 = props.secondaryLineConfig) === null || _174 === void 0 ? void 0 : _174.thickness) !== null && _175 !== void 0 ? _175 : thickness1,
418
- zIndex1: (_177 = (_176 = props.secondaryLineConfig) === null || _176 === void 0 ? void 0 : _176.zIndex1) !== null && _177 !== void 0 ? _177 : zIndex1,
419
- strokeDashArray: (_179 = (_178 = props.secondaryLineConfig) === null || _178 === void 0 ? void 0 : _178.strokeDashArray) !== null && _179 !== void 0 ? _179 : strokeDashArray1,
420
- startIndex: (_181 = (_180 = props.secondaryLineConfig) === null || _180 === void 0 ? void 0 : _180.startIndex) !== null && _181 !== void 0 ? _181 : startIndex1,
421
- endIndex: (_183 = (_182 = props.secondaryLineConfig) === null || _182 === void 0 ? void 0 : _182.endIndex) !== null && _183 !== void 0 ? _183 : endIndex1,
422
- hideDataPoints: (_185 = (_184 = props.secondaryLineConfig) === null || _184 === void 0 ? void 0 : _184.hideDataPoints) !== null && _185 !== void 0 ? _185 : hideDataPoints1,
423
- dataPointsHeight: (_187 = (_186 = props.secondaryLineConfig) === null || _186 === void 0 ? void 0 : _186.dataPointsHeight) !== null && _187 !== void 0 ? _187 : dataPointsHeight1,
424
- dataPointsWidth: (_189 = (_188 = props.secondaryLineConfig) === null || _188 === void 0 ? void 0 : _188.dataPointsWidth) !== null && _189 !== void 0 ? _189 : dataPointsWidth1,
425
- dataPointsRadius: (_191 = (_190 = props.secondaryLineConfig) === null || _190 === void 0 ? void 0 : _190.dataPointsRadius) !== null && _191 !== void 0 ? _191 : dataPointsRadius1,
426
- dataPointsColor: (_193 = (_192 = props.secondaryLineConfig) === null || _192 === void 0 ? void 0 : _192.dataPointsColor) !== null && _193 !== void 0 ? _193 : dataPointsColor1,
427
- dataPointsShape: (_195 = (_194 = props.secondaryLineConfig) === null || _194 === void 0 ? void 0 : _194.dataPointsShape) !== null && _195 !== void 0 ? _195 : dataPointsShape1,
428
- showValuesAsDataPointsText: (_197 = (_196 = props.secondaryLineConfig) === null || _196 === void 0 ? void 0 : _196.showValuesAsDataPointsText) !== null && _197 !== void 0 ? _197 : showValuesAsDataPointsText,
429
- startFillColor: (_199 = (_198 = props.secondaryLineConfig) === null || _198 === void 0 ? void 0 : _198.startFillColor) !== null && _199 !== void 0 ? _199 : startFillColor1,
430
- endFillColor: (_201 = (_200 = props.secondaryLineConfig) === null || _200 === void 0 ? void 0 : _200.endFillColor) !== null && _201 !== void 0 ? _201 : endFillColor1,
431
- startOpacity: (_203 = (_202 = props.secondaryLineConfig) === null || _202 === void 0 ? void 0 : _202.startOpacity) !== null && _203 !== void 0 ? _203 : startOpacity1,
432
- endOpacity: (_205 = (_204 = props.secondaryLineConfig) === null || _204 === void 0 ? void 0 : _204.endOpacity) !== null && _205 !== void 0 ? _205 : endOpacity1,
433
- textFontSize: (_207 = (_206 = props.secondaryLineConfig) === null || _206 === void 0 ? void 0 : _206.textFontSize) !== null && _207 !== void 0 ? _207 : textFontSize1,
434
- textColor: (_209 = (_208 = props.secondaryLineConfig) === null || _208 === void 0 ? void 0 : _208.textColor) !== null && _209 !== void 0 ? _209 : textColor1,
435
- showArrow: (_211 = (_210 = props.secondaryLineConfig) === null || _210 === void 0 ? void 0 : _210.showArrow) !== null && _211 !== void 0 ? _211 : props.showArrows,
436
- arrowConfig: (_213 = (_212 = props.secondaryLineConfig) === null || _212 === void 0 ? void 0 : _212.arrowConfig) !== null && _213 !== void 0 ? _213 : props.arrowConfig,
437
- };
438
- var addLeadingAndTrailingPathForAreaFill = function (initialPath, value, dataLength) {
439
- return ("M " +
440
- initialSpacing +
441
- "," +
442
- heightUptoXaxis +
443
- " " +
444
- "L " +
445
- initialSpacing +
446
- "," +
447
- getY(value) +
448
- " " +
449
- initialPath +
450
- " " +
451
- "L " +
452
- (initialSpacing + spacing * (dataLength - 1)) +
453
- "," +
454
- heightUptoXaxis +
455
- " " +
456
- "L " +
457
- initialSpacing +
458
- "," +
459
- heightUptoXaxis +
460
- " ");
461
- };
462
- var getNextPoint = function (data, index, around, before) {
463
- var isLast = index === data.length - 1;
464
- return isLast && !(around || before)
465
- ? " "
466
- : " L" +
467
- (getX(index) +
468
- (around ? (isLast ? 0 : spacing / 2) : before ? 0 : spacing)) +
469
- " " +
470
- getY(data[index].value) +
471
- " ";
472
- };
473
- var getStepPath = function (data, i) {
474
- var around = edgePosition === types_1.EdgePosition.AROUND_DATA_POINT;
475
- var before = edgePosition === types_1.EdgePosition.BEFORE_DATA_POINT;
476
- return ("L" +
477
- (getX(i) -
478
- (around && i > 0 ? spacing / 2 : before && i > 0 ? spacing : 0)) +
479
- " " +
480
- getY(data[i].value) +
481
- getNextPoint(data, i, around, before));
482
- };
483
- var getSegmentPath = function (data, i, lineSegment, startIndex, endIndex) {
484
- var path = "L" +
485
- getX(i) +
486
- " " +
487
- getY(data[i].value) +
488
- " " +
489
- utils_1.getSegmentString(lineSegment, i, constants_1.SEGMENT_START, constants_1.SEGMENT_END);
490
- if (highlightedRange) {
491
- path += utils_1.getPathWithHighlight(data, i, highlightedRange, startIndex, endIndex, getX, getY);
492
- }
493
- return path;
494
- };
495
- react_1.useEffect(function () {
496
- if (dataSet) {
497
- var pointsArray_1 = [];
498
- var arrowPointsArray_1 = [];
499
- var fillPointsArray_1 = [];
500
- dataSet.map(function (set, index) {
501
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
502
- var setData = set.data.map(function (item) {
503
- var _a;
504
- item.value = item.value - ((_a = props.yAxisOffset) !== null && _a !== void 0 ? _a : 0);
505
- return item;
506
- });
507
- if ((_a = set.curved) !== null && _a !== void 0 ? _a : props.curved) {
508
- var pArray = [];
509
- for (var i = 0; i < setData.length; i++) {
510
- if (i >= ((_b = set.startIndex) !== null && _b !== void 0 ? _b : 0) &&
511
- i <= ((_c = set.endIndex) !== null && _c !== void 0 ? _c : set.data.length - 1)) {
512
- pArray.push([getX(i), getY(setData[i].value)]);
513
- }
514
- }
515
- var xx = utils_1.svgPath(pArray, (_d = set.curveType) !== null && _d !== void 0 ? _d : curveType, (_e = set.curvature) !== null && _e !== void 0 ? _e : curvature);
516
- pointsArray_1.push(utils_1.getCurvePathWithSegments(xx, set.lineSegments, constants_1.SEGMENT_START, constants_1.SEGMENT_END));
517
- // For Arrow-
518
- if (setData.length > 1 && ((_f = set.showArrow) !== null && _f !== void 0 ? _f : props.showArrows)) {
519
- var arrowTipY = pArray[pArray.length - 1][1];
520
- var arrowTipX = pArray[pArray.length - 1][0];
521
- var y1 = pArray[pArray.length - 2][1];
522
- var x1 = pArray[pArray.length - 2][0];
523
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLengthsFromSet[index], arrowWidthsFromSet[index], showArrowBasesFromSet[index]);
524
- arrowPointsArray_1.push(arrowPoints);
525
- }
526
- // For Area charts-
527
- if ((set.areaChart || areaChart) && setData.length) {
528
- xx = addLeadingAndTrailingPathForAreaFill(xx, setData[0].value, setData.length);
529
- fillPointsArray_1.push(xx);
530
- }
531
- }
532
- else {
533
- var pp = "";
534
- for (var i = 0; i < setData.length; i++) {
535
- if (i >= ((_g = set.startIndex) !== null && _g !== void 0 ? _g : 0) &&
536
- i <= ((_h = set.endIndex) !== null && _h !== void 0 ? _h : set.data.length - 1)) {
537
- if (set.stepChart || stepChart) {
538
- pp += getStepPath(setData, i);
539
- }
540
- else {
541
- pp += getSegmentPath(setData, i, set.lineSegments, (_j = set.startIndex) !== null && _j !== void 0 ? _j : 0, (_k = set.endIndex) !== null && _k !== void 0 ? _k : set.data.length - 1);
542
- }
543
- }
544
- }
545
- pointsArray_1.push(pp.replace("L", "M"));
546
- // For Arrow-
547
- if (setData.length > 1 && ((_l = set.showArrow) !== null && _l !== void 0 ? _l : props.showArrows)) {
548
- var ppArray = pp.trim().split(" ");
549
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
550
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
551
- var y1 = parseInt(ppArray[ppArray.length - 3]);
552
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
553
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLengthsFromSet[index], arrowWidthsFromSet[index], showArrowBasesFromSet[index]);
554
- arrowPointsArray_1.push(arrowPoints);
555
- }
556
- // For Area charts-
557
- if ((set.areaChart || areaChart) && setData.length) {
558
- var ppp = "L" + initialSpacing + " " + heightUptoXaxis + " ";
559
- ppp += pp;
560
- ppp +=
561
- "L" +
562
- (initialSpacing + spacing * (setData.length - 1)) +
563
- " " +
564
- heightUptoXaxis;
565
- ppp += "L" + initialSpacing + " " + heightUptoXaxis + " ";
566
- fillPointsArray_1.push(ppp.replace("L", "M"));
567
- }
568
- }
569
- });
570
- setPointsFromSet(pointsArray_1);
571
- setArrowPointsFromSet(arrowPointsArray_1);
572
- setFillPointsFromSet(fillPointsArray_1);
573
- }
574
- else {
575
- var pp = "", pp2 = "", pp3 = "", pp4 = "", pp5 = "";
576
- if (!props.curved) {
577
- for (var i = 0; i < data.length; i++) {
578
- if (i >= startIndex1 && i <= endIndex1 && !animateOnDataChange) {
579
- if (stepChart || stepChart1) {
580
- pp += getStepPath(data, i);
581
- }
582
- else {
583
- pp += getSegmentPath(data, i, lineSegments, startIndex1, endIndex1);
584
- }
585
- }
586
- if (data2.length && i >= startIndex2 && i <= endIndex2) {
587
- if (stepChart || stepChart2) {
588
- pp2 += getStepPath(data2, i);
589
- (" ");
590
- }
591
- else {
592
- pp2 += getSegmentPath(data2, i, lineSegments2, startIndex2, endIndex2);
593
- }
594
- }
595
- if (data3.length && i >= startIndex3 && i <= endIndex3) {
596
- if (stepChart || stepChart3) {
597
- pp3 += getStepPath(data3, i);
598
- }
599
- else {
600
- pp3 += getSegmentPath(data3, i, lineSegments3, startIndex3, endIndex3);
601
- }
602
- }
603
- if (data4.length && i >= startIndex4 && i <= endIndex4) {
604
- if (stepChart || stepChart4) {
605
- pp4 += getStepPath(data4, i);
606
- }
607
- else {
608
- pp4 += getSegmentPath(data4, i, lineSegments4, startIndex4, endIndex4);
609
- }
610
- }
611
- if (data5.length && i >= startIndex5 && i <= endIndex5) {
612
- if (stepChart || stepChart5) {
613
- pp5 += getStepPath(data5, i);
614
- }
615
- else {
616
- pp5 += getSegmentPath(data5, i, lineSegments5, startIndex5, endIndex5);
617
- }
618
- }
619
- }
620
- setPoints2(pp2.replace("L", "M"));
621
- setPoints3(pp3.replace("L", "M"));
622
- setPoints4(pp4.replace("L", "M"));
623
- setPoints5(pp5.replace("L", "M"));
624
- setPoints(pp.replace("L", "M"));
625
- if (data.length > 1 && (props.showArrow1 || props.showArrows)) {
626
- var ppArray = pp.trim().split(" ");
627
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
628
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
629
- var y1 = parseInt(ppArray[ppArray.length - 3]);
630
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
631
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength1, arrowWidth1, showArrowBase1);
632
- setArrow1Points(arrowPoints);
633
- }
634
- if (data2.length > 1 && (props.showArrow2 || props.showArrows)) {
635
- var ppArray = pp2.trim().split(" ");
636
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
637
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
638
- var y1 = parseInt(ppArray[ppArray.length - 3]);
639
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
640
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength2, arrowWidth2, showArrowBase2);
641
- setArrow2Points(arrowPoints);
642
- }
643
- if (data3.length > 1 && (props.showArrow3 || props.showArrows)) {
644
- var ppArray = pp3.trim().split(" ");
645
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
646
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
647
- var y1 = parseInt(ppArray[ppArray.length - 3]);
648
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
649
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength3, arrowWidth3, showArrowBase3);
650
- setArrow3Points(arrowPoints);
651
- }
652
- if (data4.length > 1 && (props.showArrow4 || props.showArrows)) {
653
- var ppArray = pp4.trim().split(" ");
654
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
655
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
656
- var y1 = parseInt(ppArray[ppArray.length - 3]);
657
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
658
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength4, arrowWidth4, showArrowBase4);
659
- setArrow4Points(arrowPoints);
660
- }
661
- if (data5.length > 1 && (props.showArrow5 || props.showArrows)) {
662
- var ppArray = pp5.trim().split(" ");
663
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
664
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
665
- var y1 = parseInt(ppArray[ppArray.length - 3]);
666
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
667
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength5, arrowWidth5, showArrowBase5);
668
- setArrow5Points(arrowPoints);
669
- }
670
- /*************************** For Area Charts *************************/
671
- if (atLeastOneAreaChart) {
672
- var ppp = "", ppp2 = "", ppp3 = "", ppp4 = "", ppp5 = "";
673
- if ((areaChart || areaChart1) &&
674
- data.length &&
675
- !animateOnDataChange) {
676
- ppp = "L" + initialSpacing + " " + heightUptoXaxis + " ";
677
- ppp += pp;
678
- ppp +=
679
- "L" +
680
- (initialSpacing + spacing * (data.length - 1)) +
681
- " " +
682
- heightUptoXaxis;
683
- ppp += "L" + initialSpacing + " " + heightUptoXaxis + " ";
684
- setFillPoints(ppp.replace("L", "M"));
685
- }
686
- if ((areaChart || areaChart2) && data2.length) {
687
- ppp2 = "L" + initialSpacing + " " + heightUptoXaxis + " ";
688
- ppp2 += pp2;
689
- ppp2 +=
690
- "L" +
691
- (initialSpacing + spacing * (data.length - 1)) +
692
- " " +
693
- heightUptoXaxis;
694
- ppp2 += "L" + initialSpacing + " " + heightUptoXaxis + " ";
695
- setFillPoints2(ppp2.replace("L", "M"));
696
- }
697
- if ((areaChart || areaChart3) && data3.length) {
698
- ppp3 = "L" + initialSpacing + " " + heightUptoXaxis + " ";
699
- ppp3 += pp3;
700
- ppp3 +=
701
- "L" +
702
- (initialSpacing + spacing * (data.length - 1)) +
703
- " " +
704
- heightUptoXaxis;
705
- ppp3 += "L" + initialSpacing + " " + heightUptoXaxis + " ";
706
- setFillPoints3(ppp3.replace("L", "M"));
707
- }
708
- if ((areaChart || areaChart4) && data4.length) {
709
- ppp4 = "L" + initialSpacing + " " + heightUptoXaxis + " ";
710
- ppp4 += pp4;
711
- ppp4 +=
712
- "L" +
713
- (initialSpacing + spacing * (data.length - 1)) +
714
- " " +
715
- heightUptoXaxis;
716
- ppp4 += "L" + initialSpacing + " " + heightUptoXaxis + " ";
717
- setFillPoints4(ppp4.replace("L", "M"));
718
- }
719
- if ((areaChart || areaChart5) && data5.length) {
720
- ppp5 = "L" + initialSpacing + " " + heightUptoXaxis + " ";
721
- ppp5 += pp5;
722
- ppp5 +=
723
- "L" +
724
- (initialSpacing + spacing * (data.length - 1)) +
725
- " " +
726
- heightUptoXaxis;
727
- ppp5 += "L" + initialSpacing + " " + heightUptoXaxis + " ";
728
- setFillPoints5(ppp5.replace("L", "M"));
729
- }
730
- }
731
- /*************************************************************************************/
732
- }
733
- else {
734
- var p1Array = [], p2Array = [], p3Array = [], p4Array = [], p5Array = [];
735
- for (var i = 0; i < data.length; i++) {
736
- if (i >= startIndex1 && i <= endIndex1) {
737
- p1Array.push([getX(i), getY(data[i].value)]);
738
- }
739
- if (data2.length && i >= startIndex2 && i <= endIndex2) {
740
- p2Array.push([getX(i), getY(data2[i].value)]);
741
- }
742
- if (data3.length && i >= startIndex3 && i <= endIndex3) {
743
- p3Array.push([getX(i), getY(data3[i].value)]);
744
- }
745
- if (data4.length && i >= startIndex4 && i <= endIndex4) {
746
- p4Array.push([getX(i), getY(data4[i].value)]);
747
- }
748
- if (data5.length && i >= startIndex5 && i <= endIndex5) {
749
- p5Array.push([getX(i), getY(data5[i].value)]);
750
- }
751
- }
752
- var xx = utils_1.svgPath(p1Array, curveType, curvature);
753
- var xx2 = utils_1.svgPath(p2Array, curveType, curvature);
754
- var xx3 = utils_1.svgPath(p3Array, curveType, curvature);
755
- var xx4 = utils_1.svgPath(p4Array, curveType, curvature);
756
- var xx5 = utils_1.svgPath(p5Array, curveType, curvature);
757
- setPoints(utils_1.getCurvePathWithSegments(xx, lineSegments, constants_1.SEGMENT_START, constants_1.SEGMENT_END));
758
- setPoints2(utils_1.getCurvePathWithSegments(xx2, lineSegments2, constants_1.SEGMENT_START, constants_1.SEGMENT_END));
759
- setPoints3(utils_1.getCurvePathWithSegments(xx3, lineSegments3, constants_1.SEGMENT_START, constants_1.SEGMENT_END));
760
- setPoints4(utils_1.getCurvePathWithSegments(xx4, lineSegments4, constants_1.SEGMENT_START, constants_1.SEGMENT_END));
761
- setPoints5(utils_1.getCurvePathWithSegments(xx5, lineSegments5, constants_1.SEGMENT_START, constants_1.SEGMENT_END));
762
- if (data.length > 1 && (props.showArrow1 || props.showArrows)) {
763
- var arrowTipY = p1Array[p1Array.length - 1][1];
764
- var arrowTipX = p1Array[p1Array.length - 1][0];
765
- var y1 = p1Array[p1Array.length - 2][1];
766
- var x1 = p1Array[p1Array.length - 2][0];
767
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength1, arrowWidth1, showArrowBase1);
768
- setArrow1Points(arrowPoints);
769
- }
770
- if (data2.length > 1 && (props.showArrow2 || props.showArrows)) {
771
- var arrowTipY = p2Array[p2Array.length - 1][1];
772
- var arrowTipX = p2Array[p2Array.length - 1][0];
773
- var y1 = p2Array[p2Array.length - 2][1];
774
- var x1 = p2Array[p2Array.length - 2][0];
775
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength2, arrowWidth2, showArrowBase2);
776
- setArrow2Points(arrowPoints);
777
- }
778
- if (data3.length > 1 && (props.showArrow3 || props.showArrows)) {
779
- var arrowTipY = p3Array[p3Array.length - 1][1];
780
- var arrowTipX = p3Array[p3Array.length - 1][0];
781
- var y1 = p3Array[p3Array.length - 2][1];
782
- var x1 = p3Array[p3Array.length - 2][0];
783
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength3, arrowWidth3, showArrowBase3);
784
- setArrow2Points(arrowPoints);
785
- }
786
- if (data4.length > 1 && (props.showArrow4 || props.showArrows)) {
787
- var arrowTipY = p4Array[p4Array.length - 1][1];
788
- var arrowTipX = p4Array[p4Array.length - 1][0];
789
- var y1 = p4Array[p4Array.length - 2][1];
790
- var x1 = p4Array[p4Array.length - 2][0];
791
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength4, arrowWidth4, showArrowBase4);
792
- setArrow2Points(arrowPoints);
793
- }
794
- if (data5.length > 1 && (props.showArrow5 || props.showArrows)) {
795
- var arrowTipY = p5Array[p5Array.length - 1][1];
796
- var arrowTipX = p5Array[p5Array.length - 1][0];
797
- var y1 = p5Array[p5Array.length - 2][1];
798
- var x1 = p5Array[p5Array.length - 2][0];
799
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength5, arrowWidth5, showArrowBase5);
800
- setArrow2Points(arrowPoints);
801
- }
802
- /*************************** For Area Charts *************************/
803
- if (atLeastOneAreaChart) {
804
- if ((areaChart || areaChart1) && data.length) {
805
- xx = addLeadingAndTrailingPathForAreaFill(xx, data[0].value, data.length);
806
- setFillPoints(xx);
807
- }
808
- if ((areaChart || areaChart2) && data2.length) {
809
- xx2 = addLeadingAndTrailingPathForAreaFill(xx2, data2[0].value, data2.length);
810
- setFillPoints2(xx2);
811
- }
812
- if ((areaChart || areaChart3) && data3.length) {
813
- xx3 = addLeadingAndTrailingPathForAreaFill(xx3, data3[0].value, data3.length);
814
- setFillPoints3(xx3);
815
- }
816
- if ((areaChart || areaChart4) && data4.length) {
817
- xx4 = addLeadingAndTrailingPathForAreaFill(xx4, data4[0].value, data4.length);
818
- setFillPoints4(xx4);
819
- }
820
- if ((areaChart || areaChart5) && data5.length) {
821
- xx5 = addLeadingAndTrailingPathForAreaFill(xx5, data5[0].value, data5.length);
822
- setFillPoints5(xx5);
823
- }
824
- }
825
- /*************************************************************************************/
826
- }
827
- }
828
- }, [
829
- animateOnDataChange,
830
- areaChart,
831
- areaChart1,
832
- areaChart2,
833
- containerHeight,
834
- data,
835
- data2,
836
- data3,
837
- data4,
838
- data5,
839
- // data0,
840
- dataPointsWidth1,
841
- dataPointsWidth2,
842
- dataPointsWidth3,
843
- dataPointsWidth4,
844
- dataPointsWidth5,
845
- initialSpacing,
846
- maxValue,
847
- props.curved,
848
- spacing,
849
- xAxisThickness,
850
- startIndex1,
851
- endIndex1,
852
- startIndex2,
853
- endIndex2,
854
- startIndex3,
855
- endIndex3,
856
- startIndex4,
857
- endIndex4,
858
- startIndex5,
859
- endIndex5,
860
- arrowLength1,
861
- arrowWidth1,
862
- showArrowBase1,
863
- props.showArrow1,
864
- props.showArrows,
865
- props.showArrow2,
866
- props.showArrow3,
867
- props.showArrow4,
868
- props.showArrow5,
869
- arrowLength2,
870
- arrowWidth2,
871
- showArrowBase2,
872
- arrowLength3,
873
- arrowWidth3,
874
- showArrowBase3,
875
- arrowLength4,
876
- arrowWidth4,
877
- showArrowBase4,
878
- arrowLength5,
879
- arrowWidth5,
880
- showArrowBase5,
881
- ]);
882
- react_1.useEffect(function () {
883
- var _a, _b, _c;
884
- var pp = "";
885
- if (!secondaryLineConfig.curved) {
886
- for (var i = 0; i < secondaryData.length; i++) {
887
- if (i >= secondaryLineConfig.startIndex &&
888
- i <= secondaryLineConfig.endIndex &&
889
- !animateOnDataChange) {
890
- pp +=
891
- "L" + getX(i) + " " + getSecondaryY(secondaryData[i].value) + " ";
892
- }
893
- }
894
- setSecondaryPoints(pp.replace("L", "M"));
895
- if (secondaryData.length > 1 && secondaryLineConfig.showArrow) {
896
- var ppArray = pp.trim().split(" ");
897
- var arrowTipY = parseInt(ppArray[ppArray.length - 1]);
898
- var arrowTipX = parseInt(ppArray[ppArray.length - 2].replace("L", ""));
899
- var y1 = parseInt(ppArray[ppArray.length - 3]);
900
- var x1 = parseInt(ppArray[ppArray.length - 4].replace("L", ""));
901
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, (_a = secondaryLineConfig.arrowConfig) === null || _a === void 0 ? void 0 : _a.length, (_b = secondaryLineConfig.arrowConfig) === null || _b === void 0 ? void 0 : _b.width, (_c = secondaryLineConfig.arrowConfig) === null || _c === void 0 ? void 0 : _c.showArrowBase);
902
- setSecondaryArrowPoints(arrowPoints);
903
- }
904
- /*************************** For Area Chart *************************/
905
- if (secondaryLineConfig.areaChart) {
906
- var ppp = "";
907
- if (secondaryData.length && !animateOnDataChange) {
908
- ppp = "L" + initialSpacing + " " + heightUptoXaxis + " ";
909
- ppp += pp;
910
- ppp +=
911
- "L" +
912
- (initialSpacing + spacing * (secondaryData.length - 1)) +
913
- " " +
914
- heightUptoXaxis;
915
- ppp += "L" + initialSpacing + " " + heightUptoXaxis + " ";
916
- setSecondaryFillPoints(ppp.replace("L", "M"));
917
- }
918
- }
919
- }
920
- else {
921
- /*************************** For Curved Charts *************************/
922
- var p1Array = [];
923
- for (var i = 0; i < secondaryData.length; i++) {
924
- if (i >= secondaryLineConfig.startIndex &&
925
- i <= secondaryLineConfig.endIndex) {
926
- p1Array.push([getX(i), getSecondaryY(secondaryData[i].value)]);
927
- }
928
- }
929
- var xx = utils_1.svgPath(p1Array, secondaryLineConfig.curveType, secondaryLineConfig.curvature);
930
- setSecondaryPoints(xx);
931
- if (secondaryData.length > 1 && (props.showArrow1 || props.showArrows)) {
932
- var arrowTipY = p1Array[p1Array.length - 1][1];
933
- var arrowTipX = p1Array[p1Array.length - 1][0];
934
- var y1 = p1Array[p1Array.length - 2][1];
935
- var x1 = p1Array[p1Array.length - 2][0];
936
- var arrowPoints = utils_1.getArrowPoints(arrowTipX, arrowTipY, x1, y1, arrowLength1, arrowWidth1, showArrowBase1);
937
- setSecondaryArrowPoints(arrowPoints);
938
- }
939
- /*************************** For Curved Area Charts *************************/
940
- if (secondaryLineConfig.areaChart) {
941
- if (secondaryData.length) {
942
- xx = addLeadingAndTrailingPathForAreaFill(xx, secondaryData[0].value, secondaryData.length);
943
- setSecondaryFillPoints(xx);
944
- }
945
- }
946
- }
947
- }, [secondaryData, secondaryLineConfig]);
948
- var gradientDirection = (_214 = props.gradientDirection) !== null && _214 !== void 0 ? _214 : "vertical";
949
- var horizSections = [{ value: "0" }];
950
- var stepHeight = props.stepHeight || containerHeight / noOfSections;
951
- var stepValue = props.stepValue || maxValue / noOfSections;
952
- var noOfSectionsBelowXAxis = (_215 = props.noOfSectionsBelowXAxis) !== null && _215 !== void 0 ? _215 : -mostNegativeValue / (stepValue || 1);
953
- var showXAxisIndices = (_216 = props.showXAxisIndices) !== null && _216 !== void 0 ? _216 : constants_1.AxesAndRulesDefaults.showXAxisIndices;
954
- var xAxisIndicesHeight = (_217 = props.xAxisIndicesHeight) !== null && _217 !== void 0 ? _217 : constants_1.AxesAndRulesDefaults.xAxisIndicesHeight;
955
- var xAxisIndicesWidth = (_218 = props.xAxisIndicesWidth) !== null && _218 !== void 0 ? _218 : constants_1.AxesAndRulesDefaults.xAxisIndicesWidth;
956
- var xAxisIndicesColor = (_219 = props.xAxisIndicesColor) !== null && _219 !== void 0 ? _219 : constants_1.AxesAndRulesDefaults.xAxisIndicesColor;
957
- var xAxisTextNumberOfLines = (_220 = props.xAxisTextNumberOfLines) !== null && _220 !== void 0 ? _220 : constants_1.AxesAndRulesDefaults.xAxisTextNumberOfLines;
958
- var xAxisLabelsVerticalShift = (_221 = props.xAxisLabelsVerticalShift) !== null && _221 !== void 0 ? _221 : constants_1.AxesAndRulesDefaults.xAxisLabelsVerticalShift;
959
- var horizontalRulesStyle = props.horizontalRulesStyle;
960
- var showFractionalValues = (_222 = props.showFractionalValues) !== null && _222 !== void 0 ? _222 : constants_1.AxesAndRulesDefaults.showFractionalValues;
961
- var horizontal = false;
962
- var yAxisAtTop = false;
963
- constants_1.defaultPointerConfig.pointerStripHeight = containerHeight;
964
- var pointerConfig = props.pointerConfig;
965
- var getPointerProps = props.getPointerProps || null;
966
- var pointerHeight = (_223 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.height) !== null && _223 !== void 0 ? _223 : constants_1.defaultPointerConfig.height;
967
- var pointerWidth = (_224 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.width) !== null && _224 !== void 0 ? _224 : constants_1.defaultPointerConfig.width;
968
- var pointerRadius = (_225 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.radius) !== null && _225 !== void 0 ? _225 : constants_1.defaultPointerConfig.radius;
969
- var pointerColor = (_226 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColor) !== null && _226 !== void 0 ? _226 : constants_1.defaultPointerConfig.pointerColor;
970
- var pointerComponent = (_227 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerComponent) !== null && _227 !== void 0 ? _227 : constants_1.defaultPointerConfig.pointerComponent;
971
- var showPointerStrip = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.showPointerStrip) === false
972
- ? false
973
- : constants_1.defaultPointerConfig.showPointerStrip;
974
- var pointerStripHeight = (_228 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripHeight) !== null && _228 !== void 0 ? _228 : constants_1.defaultPointerConfig.pointerStripHeight;
975
- var pointerStripWidth = (_229 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripWidth) !== null && _229 !== void 0 ? _229 : constants_1.defaultPointerConfig.pointerStripWidth;
976
- var pointerStripColor = (_230 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripColor) !== null && _230 !== void 0 ? _230 : constants_1.defaultPointerConfig.pointerStripColor;
977
- var pointerStripUptoDataPoint = (_231 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripUptoDataPoint) !== null && _231 !== void 0 ? _231 : constants_1.defaultPointerConfig.pointerStripUptoDataPoint;
978
- var pointerLabelComponent = (_232 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelComponent) !== null && _232 !== void 0 ? _232 : constants_1.defaultPointerConfig.pointerLabelComponent;
979
- var stripOverPointer = (_233 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripOverPointer) !== null && _233 !== void 0 ? _233 : constants_1.defaultPointerConfig.stripOverPointer;
980
- var shiftPointerLabelX = (_234 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelX) !== null && _234 !== void 0 ? _234 : constants_1.defaultPointerConfig.shiftPointerLabelX;
981
- var shiftPointerLabelY = (_235 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelY) !== null && _235 !== void 0 ? _235 : constants_1.defaultPointerConfig.shiftPointerLabelY;
982
- var pointerLabelWidth = (_236 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelWidth) !== null && _236 !== void 0 ? _236 : constants_1.defaultPointerConfig.pointerLabelWidth;
983
- var pointerLabelHeight = (_237 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelHeight) !== null && _237 !== void 0 ? _237 : constants_1.defaultPointerConfig.pointerLabelHeight;
984
- var autoAdjustPointerLabelPosition = (_238 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.autoAdjustPointerLabelPosition) !== null && _238 !== void 0 ? _238 : constants_1.defaultPointerConfig.autoAdjustPointerLabelPosition;
985
- var pointerVanishDelay = (_239 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerVanishDelay) !== null && _239 !== void 0 ? _239 : constants_1.defaultPointerConfig.pointerVanishDelay;
986
- var activatePointersOnLongPress = (_240 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersOnLongPress) !== null && _240 !== void 0 ? _240 : constants_1.defaultPointerConfig.activatePointersOnLongPress;
987
- var activatePointersDelay = (_241 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersDelay) !== null && _241 !== void 0 ? _241 : constants_1.defaultPointerConfig.activatePointersDelay;
988
- var initialPointerIndex = (_242 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerIndex) !== null && _242 !== void 0 ? _242 : constants_1.defaultPointerConfig.initialPointerIndex;
989
- var initialPointerAppearDelay = (_243 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerAppearDelay) !== null && _243 !== void 0 ? _243 : (isAnimated
990
- ? animationDuration
991
- : constants_1.defaultPointerConfig.initialPointerAppearDelay);
992
- var persistPointer = (_244 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.persistPointer) !== null && _244 !== void 0 ? _244 : constants_1.defaultPointerConfig.persistPointer;
993
- var hidePointer1 = (_245 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer1) !== null && _245 !== void 0 ? _245 : constants_1.defaultPointerConfig.hidePointer1;
994
- var hidePointer2 = (_246 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer2) !== null && _246 !== void 0 ? _246 : constants_1.defaultPointerConfig.hidePointer2;
995
- var hidePointer3 = (_247 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer3) !== null && _247 !== void 0 ? _247 : constants_1.defaultPointerConfig.hidePointer3;
996
- var hidePointer4 = (_248 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer4) !== null && _248 !== void 0 ? _248 : constants_1.defaultPointerConfig.hidePointer4;
997
- var hidePointer5 = (_249 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer5) !== null && _249 !== void 0 ? _249 : constants_1.defaultPointerConfig.hidePointer5;
998
- var hideSecondaryPointer = (_250 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hideSecondaryPointer) !== null && _250 !== void 0 ? _250 : constants_1.defaultPointerConfig.hideSecondaryPointer;
999
- var resetPointerOnDataChange = (_251 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.resetPointerOnDataChange) !== null && _251 !== void 0 ? _251 : constants_1.defaultPointerConfig.resetPointerOnDataChange;
1000
- var pointerEvents = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerEvents;
1001
- var disableScroll = props.disableScroll ||
1002
- (pointerConfig
1003
- ? activatePointersOnLongPress
1004
- ? responderActive
1005
- ? true
1006
- : false
1007
- : true
1008
- : false);
1009
- var showScrollIndicator = (_252 = props.showScrollIndicator) !== null && _252 !== void 0 ? _252 : constants_1.LineDefaults.showScrollIndicator;
1010
- var focusEnabled = (_253 = props.focusEnabled) !== null && _253 !== void 0 ? _253 : constants_1.LineDefaults.focusEnabled;
1011
- var showDataPointOnFocus = (_254 = props.showDataPointOnFocus) !== null && _254 !== void 0 ? _254 : constants_1.LineDefaults.showDataPointOnFocus;
1012
- var showStripOnFocus = (_255 = props.showStripOnFocus) !== null && _255 !== void 0 ? _255 : constants_1.LineDefaults.showStripOnFocus;
1013
- var showTextOnFocus = (_256 = props.showTextOnFocus) !== null && _256 !== void 0 ? _256 : constants_1.LineDefaults.showTextOnFocus;
1014
- var stripHeight = props.stripHeight;
1015
- var stripWidth = (_257 = props.stripWidth) !== null && _257 !== void 0 ? _257 : constants_1.LineDefaults.stripWidth;
1016
- var stripColor = (_258 = props.stripColor) !== null && _258 !== void 0 ? _258 : color1;
1017
- var stripOpacity = (_259 = props.stripOpacity) !== null && _259 !== void 0 ? _259 : (startOpacity1 + endOpacity1) / 2;
1018
- var unFocusOnPressOut = (_260 = props.unFocusOnPressOut) !== null && _260 !== void 0 ? _260 : constants_1.LineDefaults.unFocusOnPressOut;
1019
- var delayBeforeUnFocus = (_261 = props.delayBeforeUnFocus) !== null && _261 !== void 0 ? _261 : constants_1.LineDefaults.delayBeforeUnFocus;
1020
- var containerHeightIncludingBelowXAxis = extendedContainerHeight + noOfSectionsBelowXAxis * stepHeight;
1021
- var lineGradient = (_262 = props.lineGradient) !== null && _262 !== void 0 ? _262 : constants_1.LineDefaults.lineGradient;
1022
- var lineGradientDirection = (_263 = props.lineGradientDirection) !== null && _263 !== void 0 ? _263 : "vertical";
1023
- var lineGradientStartColor = (_264 = props.lineGradientStartColor) !== null && _264 !== void 0 ? _264 : constants_1.LineDefaults.lineGradientStartColor;
1024
- var lineGradientEndColor = (_265 = props.lineGradientEndColor) !== null && _265 !== void 0 ? _265 : constants_1.LineDefaults.lineGradientEndColor;
1025
- var getPointerY = function (value) {
1026
- return value
1027
- ? containerHeight -
1028
- (value * containerHeight) / maxValue -
1029
- (pointerRadius || pointerHeight / 2) +
1030
- 10
1031
- : 0;
1032
- };
1033
- var initialisePointers = function () {
1034
- var _a, _b, _c, _d;
1035
- if (initialPointerIndex !== -1) {
1036
- var item_1 = (data0 !== null && data0 !== void 0 ? data0 : data)[initialPointerIndex];
1037
- var x_1 = initialSpacing +
1038
- spacing * initialPointerIndex -
1039
- (pointerRadius || pointerWidth / 2) -
1040
- 1;
1041
- var y_1 = getPointerY(item_1.value);
1042
- var y2_1 = getPointerY((_a = data2 === null || data2 === void 0 ? void 0 : data2[initialPointerIndex]) === null || _a === void 0 ? void 0 : _a.value);
1043
- var y3_1 = getPointerY((_b = data3 === null || data3 === void 0 ? void 0 : data3[initialPointerIndex]) === null || _b === void 0 ? void 0 : _b.value);
1044
- var y4_1 = getPointerY((_c = data4 === null || data4 === void 0 ? void 0 : data4[initialPointerIndex]) === null || _c === void 0 ? void 0 : _c.value);
1045
- var y5_1 = getPointerY((_d = data5 === null || data5 === void 0 ? void 0 : data5[initialPointerIndex]) === null || _d === void 0 ? void 0 : _d.value);
1046
- if (initialPointerAppearDelay) {
1047
- setTimeout(function () {
1048
- setPointerConfig(initialPointerIndex, item_1, x_1, y_1, y2_1, y3_1, y4_1, y5_1);
1049
- }, initialPointerAppearDelay);
1050
- }
1051
- else {
1052
- setPointerConfig(initialPointerIndex, item_1, x_1, y_1, y2_1, y3_1, y4_1, y5_1);
1053
- }
1054
- }
1055
- };
1056
- react_1.useEffect(function () {
1057
- initialisePointers();
1058
- }, []);
1059
- react_1.useEffect(function () {
1060
- if (resetPointerOnDataChange) {
1061
- initialisePointers();
1062
- }
1063
- }, [data]);
1064
- var setPointerConfig = function (initialPointerIndex, item, x, y, y2, y3, y4, y5) {
1065
- setPointerIndex(initialPointerIndex);
1066
- setPointerItem(item);
1067
- setPointerX(x);
1068
- setPointerY(y);
1069
- setPointerY2(y2);
1070
- setPointerY3(y3);
1071
- setPointerY4(y4);
1072
- setPointerY5(y5);
1073
- };
1074
- var barAndLineChartsWrapperProps = {
1075
- chartType: constants_1.chartTypes.LINE,
1076
- containerHeight: containerHeight,
1077
- noOfSectionsBelowXAxis: noOfSectionsBelowXAxis,
1078
- stepHeight: stepHeight,
1079
- labelsExtraHeight: labelsExtraHeight,
1080
- yAxisLabelWidth: yAxisLabelWidth,
1081
- horizontal: horizontal,
1082
- rtl: false,
1083
- shiftX: 0,
1084
- shiftY: 0,
1085
- yAxisAtTop: yAxisAtTop,
1086
- initialSpacing: initialSpacing,
1087
- data: data0 !== null && data0 !== void 0 ? data0 : data,
1088
- stackData: undefined, // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1089
- secondaryData: secondaryData,
1090
- barWidth: 0, // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1091
- xAxisThickness: xAxisThickness,
1092
- totalWidth: totalWidth,
1093
- disableScroll: disableScroll,
1094
- showScrollIndicator: showScrollIndicator,
1095
- scrollToEnd: scrollToEnd,
1096
- scrollToIndex: props.scrollToIndex,
1097
- scrollAnimation: scrollAnimation,
1098
- scrollEventThrottle: scrollEventThrottle,
1099
- indicatorColor: props.indicatorColor,
1100
- setSelectedIndex: setSelectedIndex,
1101
- spacing: spacing,
1102
- showLine: false,
1103
- lineConfig: null, // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1104
- lineConfig2: null, // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1105
- maxValue: maxValue,
1106
- lineData: [], // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1107
- lineData2: [], // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1108
- lineBehindBars: false,
1109
- points: points,
1110
- points2: "", // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1111
- arrowPoints: [], // Not needed but passing this prop to maintain consistency (between LineChart and BarChart props)
1112
- //horizSectionProps-
1113
- width: props.width,
1114
- horizSections: horizSections,
1115
- endSpacing: endSpacing,
1116
- horizontalRulesStyle: horizontalRulesStyle,
1117
- noOfSections: noOfSections,
1118
- showFractionalValues: showFractionalValues,
1119
- axesAndRulesProps: utils_1.getAxesAndRulesProps(props, stepValue, undefined),
1120
- yAxisLabelTexts: props.yAxisLabelTexts,
1121
- yAxisOffset: props.yAxisOffset,
1122
- rotateYAxisTexts: 0,
1123
- hideAxesAndRules: props.hideAxesAndRules,
1124
- showXAxisIndices: showXAxisIndices,
1125
- xAxisIndicesHeight: xAxisIndicesHeight,
1126
- xAxisIndicesWidth: xAxisIndicesWidth,
1127
- xAxisIndicesColor: xAxisIndicesColor,
1128
- pointerConfig: pointerConfig,
1129
- getPointerProps: getPointerProps,
1130
- pointerIndex: pointerIndex,
1131
- pointerX: pointerX,
1132
- pointerY: pointerY,
1133
- onEndReached: props.onEndReached,
1134
- onStartReached: props.onStartReached,
1135
- endReachedOffset: (_266 = props.endReachedOffset) !== null && _266 !== void 0 ? _266 : constants_1.LineDefaults.endReachedOffset,
1136
- };
1137
- return {
1138
- curvature: curvature,
1139
- curveType: curveType,
1140
- scrollX: scrollX,
1141
- setScrollX: setScrollX,
1142
- arrow1Points: arrow1Points,
1143
- setArrow1Points: setArrow1Points,
1144
- arrow2Points: arrow2Points,
1145
- setArrow2Points: setArrow2Points,
1146
- arrow3Points: arrow3Points,
1147
- setArrow3Points: setArrow3Points,
1148
- arrow4Points: arrow4Points,
1149
- setArrow4Points: setArrow4Points,
1150
- arrow5Points: arrow5Points,
1151
- setArrow5Points: setArrow5Points,
1152
- secondaryArrowPoints: secondaryArrowPoints,
1153
- setSecondaryArrowPoints: setSecondaryArrowPoints,
1154
- pointerIndex: pointerIndex,
1155
- setPointerIndex: setPointerIndex,
1156
- pointerX: pointerX,
1157
- setPointerX: setPointerX,
1158
- pointerY: pointerY,
1159
- setPointerY: setPointerY,
1160
- pointerItem: pointerItem,
1161
- setPointerItem: setPointerItem,
1162
- pointerY2: pointerY2,
1163
- setPointerY2: setPointerY2,
1164
- pointerItem2: pointerItem2,
1165
- setPointerItem2: setPointerItem2,
1166
- pointerY3: pointerY3,
1167
- setPointerY3: setPointerY3,
1168
- pointerItem3: pointerItem3,
1169
- setPointerItem3: setPointerItem3,
1170
- pointerY4: pointerY4,
1171
- setPointerY4: setPointerY4,
1172
- pointerItem4: pointerItem4,
1173
- setPointerItem4: setPointerItem4,
1174
- pointerY5: pointerY5,
1175
- setPointerY5: setPointerY5,
1176
- pointerItem5: pointerItem5,
1177
- setPointerItem5: setPointerItem5,
1178
- secondaryPointerY: secondaryPointerY,
1179
- setSecondaryPointerY: setSecondaryPointerY,
1180
- secondaryPointerItem: secondaryPointerItem,
1181
- setSecondaryPointerItem: setSecondaryPointerItem,
1182
- responderStartTime: responderStartTime,
1183
- setResponderStartTime: setResponderStartTime,
1184
- responderActive: responderActive,
1185
- setResponderActive: setResponderActive,
1186
- points: points,
1187
- setPoints: setPoints,
1188
- points2: points2,
1189
- setPoints2: setPoints2,
1190
- points3: points3,
1191
- setPoints3: setPoints3,
1192
- points4: points4,
1193
- setPoints4: setPoints4,
1194
- points5: points5,
1195
- setPoints5: setPoints5,
1196
- secondaryPoints: secondaryPoints,
1197
- setSecondaryPoints: setSecondaryPoints,
1198
- fillPoints: fillPoints,
1199
- setFillPoints: setFillPoints,
1200
- fillPoints2: fillPoints2,
1201
- setFillPoints2: setFillPoints2,
1202
- fillPoints3: fillPoints3,
1203
- setFillPoints3: setFillPoints3,
1204
- fillPoints4: fillPoints4,
1205
- setFillPoints4: setFillPoints4,
1206
- fillPoints5: fillPoints5,
1207
- setFillPoints5: setFillPoints5,
1208
- secondaryFillPoints: secondaryFillPoints,
1209
- setSecondaryFillPoints: setSecondaryFillPoints,
1210
- pointsFromSet: pointsFromSet,
1211
- setPointsFromSet: setPointsFromSet,
1212
- fillPointsFromSet: fillPointsFromSet,
1213
- setFillPointsFromSet: setFillPointsFromSet,
1214
- arrowPointsFromSet: arrowPointsFromSet,
1215
- setArrowPointsFromSet: setArrowPointsFromSet,
1216
- selectedIndex: selectedIndex,
1217
- setSelectedIndex: setSelectedIndex,
1218
- noOfSections: noOfSections,
1219
- containerHeight: containerHeight,
1220
- data: data,
1221
- data2: data2,
1222
- data3: data3,
1223
- data4: data4,
1224
- data5: data5,
1225
- secondaryData: secondaryData,
1226
- dataSet: dataSet,
1227
- data0: data0,
1228
- scrollToEnd: scrollToEnd,
1229
- scrollAnimation: scrollAnimation,
1230
- scrollEventThrottle: scrollEventThrottle,
1231
- labelsExtraHeight: labelsExtraHeight,
1232
- animationDuration: animationDuration,
1233
- onDataChangeAnimationDuration: onDataChangeAnimationDuration,
1234
- animateTogether: animateTogether,
1235
- animateOnDataChange: animateOnDataChange,
1236
- startIndex1: startIndex1,
1237
- startIndex2: startIndex2,
1238
- endIndex1: endIndex1,
1239
- endIndex2: endIndex2,
1240
- startIndex3: startIndex3,
1241
- endIndex3: endIndex3,
1242
- startIndex4: startIndex4,
1243
- endIndex4: endIndex4,
1244
- startIndex5: startIndex5,
1245
- endIndex5: endIndex5,
1246
- lineSegments: lineSegments,
1247
- lineSegments2: lineSegments2,
1248
- lineSegments3: lineSegments3,
1249
- lineSegments4: lineSegments4,
1250
- lineSegments5: lineSegments5,
1251
- highlightedRange: highlightedRange,
1252
- adjustToWidth: adjustToWidth,
1253
- initialSpacing: initialSpacing,
1254
- endSpacing: endSpacing,
1255
- thickness: thickness,
1256
- yAxisLabelWidth: yAxisLabelWidth,
1257
- spacing: spacing,
1258
- xAxisThickness: xAxisThickness,
1259
- dataPointsHeight1: dataPointsHeight1,
1260
- dataPointsWidth1: dataPointsWidth1,
1261
- dataPointsRadius1: dataPointsRadius1,
1262
- dataPointsColor1: dataPointsColor1,
1263
- dataPointsShape1: dataPointsShape1,
1264
- dataPointsHeight2: dataPointsHeight2,
1265
- dataPointsWidth2: dataPointsWidth2,
1266
- dataPointsRadius2: dataPointsRadius2,
1267
- dataPointsColor2: dataPointsColor2,
1268
- dataPointsShape2: dataPointsShape2,
1269
- dataPointsHeight3: dataPointsHeight3,
1270
- dataPointsWidth3: dataPointsWidth3,
1271
- dataPointsRadius3: dataPointsRadius3,
1272
- dataPointsColor3: dataPointsColor3,
1273
- dataPointsShape3: dataPointsShape3,
1274
- dataPointsHeight4: dataPointsHeight4,
1275
- dataPointsWidth4: dataPointsWidth4,
1276
- dataPointsRadius4: dataPointsRadius4,
1277
- dataPointsColor4: dataPointsColor4,
1278
- dataPointsShape4: dataPointsShape4,
1279
- dataPointsHeight5: dataPointsHeight5,
1280
- dataPointsWidth5: dataPointsWidth5,
1281
- dataPointsRadius5: dataPointsRadius5,
1282
- dataPointsColor5: dataPointsColor5,
1283
- dataPointsShape5: dataPointsShape5,
1284
- areaChart: areaChart,
1285
- areaChart1: areaChart1,
1286
- areaChart2: areaChart2,
1287
- areaChart3: areaChart3,
1288
- areaChart4: areaChart4,
1289
- areaChart5: areaChart5,
1290
- atLeastOneAreaChart: atLeastOneAreaChart,
1291
- stepChart: stepChart,
1292
- stepChart1: stepChart1,
1293
- stepChart2: stepChart2,
1294
- stepChart3: stepChart3,
1295
- stepChart4: stepChart4,
1296
- stepChart5: stepChart5,
1297
- edgePosition: edgePosition,
1298
- textFontSize1: textFontSize1,
1299
- textFontSize2: textFontSize2,
1300
- textFontSize3: textFontSize3,
1301
- textFontSize4: textFontSize4,
1302
- textFontSize5: textFontSize5,
1303
- textColor1: textColor1,
1304
- textColor2: textColor2,
1305
- textColor3: textColor3,
1306
- textColor4: textColor4,
1307
- textColor5: textColor5,
1308
- totalWidth: totalWidth,
1309
- maxValue: maxValue,
1310
- mostNegativeValue: mostNegativeValue,
1311
- overflowTop: overflowTop,
1312
- extendedContainerHeight: extendedContainerHeight,
1313
- getX: getX,
1314
- getY: getY,
1315
- secondaryMaxValue: secondaryMaxValue,
1316
- getSecondaryY: getSecondaryY,
1317
- heightUptoXaxis: heightUptoXaxis,
1318
- setPointsOnChange: setPointsOnChange,
1319
- showValuesAsDataPointsText: showValuesAsDataPointsText,
1320
- thickness1: thickness1,
1321
- thickness2: thickness2,
1322
- thickness3: thickness3,
1323
- thickness4: thickness4,
1324
- thickness5: thickness5,
1325
- zIndex1: zIndex1,
1326
- zIndex2: zIndex2,
1327
- zIndex3: zIndex3,
1328
- zIndex4: zIndex4,
1329
- zIndex5: zIndex5,
1330
- strokeDashArray1: strokeDashArray1,
1331
- strokeDashArray2: strokeDashArray2,
1332
- strokeDashArray3: strokeDashArray3,
1333
- strokeDashArray4: strokeDashArray4,
1334
- strokeDashArray5: strokeDashArray5,
1335
- rotateLabel: rotateLabel,
1336
- isAnimated: isAnimated,
1337
- hideDataPoints1: hideDataPoints1,
1338
- hideDataPoints2: hideDataPoints2,
1339
- hideDataPoints3: hideDataPoints3,
1340
- hideDataPoints4: hideDataPoints4,
1341
- hideDataPoints5: hideDataPoints5,
1342
- color1: color1,
1343
- color2: color2,
1344
- color3: color3,
1345
- color4: color4,
1346
- color5: color5,
1347
- startFillColor1: startFillColor1,
1348
- endFillColor1: endFillColor1,
1349
- startOpacity: startOpacity,
1350
- endOpacity: endOpacity,
1351
- startOpacity1: startOpacity1,
1352
- endOpacity1: endOpacity1,
1353
- startFillColor2: startFillColor2,
1354
- endFillColor2: endFillColor2,
1355
- startOpacity2: startOpacity2,
1356
- endOpacity2: endOpacity2,
1357
- startFillColor3: startFillColor3,
1358
- endFillColor3: endFillColor3,
1359
- startOpacity3: startOpacity3,
1360
- endOpacity3: endOpacity3,
1361
- startFillColor4: startFillColor4,
1362
- endFillColor4: endFillColor4,
1363
- startOpacity4: startOpacity4,
1364
- endOpacity4: endOpacity4,
1365
- startFillColor5: startFillColor5,
1366
- endFillColor5: endFillColor5,
1367
- startOpacity5: startOpacity5,
1368
- endOpacity5: endOpacity5,
1369
- arrowLength1: arrowLength1,
1370
- arrowWidth1: arrowWidth1,
1371
- arrowStrokeWidth1: arrowStrokeWidth1,
1372
- arrowStrokeColor1: arrowStrokeColor1,
1373
- arrowFillColor1: arrowFillColor1,
1374
- showArrowBase1: showArrowBase1,
1375
- arrowLength2: arrowLength2,
1376
- arrowWidth2: arrowWidth2,
1377
- arrowStrokeWidth2: arrowStrokeWidth2,
1378
- arrowStrokeColor2: arrowStrokeColor2,
1379
- arrowFillColor2: arrowFillColor2,
1380
- showArrowBase2: showArrowBase2,
1381
- arrowLength3: arrowLength3,
1382
- arrowWidth3: arrowWidth3,
1383
- arrowStrokeWidth3: arrowStrokeWidth3,
1384
- arrowStrokeColor3: arrowStrokeColor3,
1385
- arrowFillColor3: arrowFillColor3,
1386
- showArrowBase3: showArrowBase3,
1387
- arrowLength4: arrowLength4,
1388
- arrowWidth4: arrowWidth4,
1389
- arrowStrokeWidth4: arrowStrokeWidth4,
1390
- arrowStrokeColor4: arrowStrokeColor4,
1391
- arrowFillColor4: arrowFillColor4,
1392
- showArrowBase4: showArrowBase4,
1393
- arrowLength5: arrowLength5,
1394
- arrowWidth5: arrowWidth5,
1395
- arrowStrokeWidth5: arrowStrokeWidth5,
1396
- arrowStrokeColor5: arrowStrokeColor5,
1397
- arrowFillColor5: arrowFillColor5,
1398
- showArrowBase5: showArrowBase5,
1399
- arrowLengthsFromSet: arrowLengthsFromSet,
1400
- arrowWidthsFromSet: arrowWidthsFromSet,
1401
- arrowStrokeWidthsFromSet: arrowStrokeWidthsFromSet,
1402
- arrowStrokeColorsFromSet: arrowStrokeColorsFromSet,
1403
- arrowFillColorsFromSet: arrowFillColorsFromSet,
1404
- showArrowBasesFromSet: showArrowBasesFromSet,
1405
- secondaryLineConfig: secondaryLineConfig,
1406
- addLeadingAndTrailingPathForAreaFill: addLeadingAndTrailingPathForAreaFill,
1407
- getNextPoint: getNextPoint,
1408
- getStepPath: getStepPath,
1409
- getSegmentPath: getSegmentPath,
1410
- gradientDirection: gradientDirection,
1411
- horizSections: horizSections,
1412
- stepHeight: stepHeight,
1413
- stepValue: stepValue,
1414
- noOfSectionsBelowXAxis: noOfSectionsBelowXAxis,
1415
- showXAxisIndices: showXAxisIndices,
1416
- xAxisIndicesHeight: xAxisIndicesHeight,
1417
- xAxisIndicesWidth: xAxisIndicesWidth,
1418
- xAxisIndicesColor: xAxisIndicesColor,
1419
- xAxisTextNumberOfLines: xAxisTextNumberOfLines,
1420
- xAxisLabelsVerticalShift: xAxisLabelsVerticalShift,
1421
- horizontalRulesStyle: horizontalRulesStyle,
1422
- showFractionalValues: showFractionalValues,
1423
- horizontal: horizontal,
1424
- yAxisAtTop: yAxisAtTop,
1425
- pointerConfig: pointerConfig,
1426
- getPointerProps: getPointerProps,
1427
- pointerHeight: pointerHeight,
1428
- pointerWidth: pointerWidth,
1429
- pointerRadius: pointerRadius,
1430
- pointerColor: pointerColor,
1431
- pointerComponent: pointerComponent,
1432
- showPointerStrip: showPointerStrip,
1433
- pointerStripHeight: pointerStripHeight,
1434
- pointerStripWidth: pointerStripWidth,
1435
- pointerStripColor: pointerStripColor,
1436
- pointerStripUptoDataPoint: pointerStripUptoDataPoint,
1437
- pointerLabelComponent: pointerLabelComponent,
1438
- stripOverPointer: stripOverPointer,
1439
- shiftPointerLabelX: shiftPointerLabelX,
1440
- shiftPointerLabelY: shiftPointerLabelY,
1441
- pointerLabelWidth: pointerLabelWidth,
1442
- pointerLabelHeight: pointerLabelHeight,
1443
- autoAdjustPointerLabelPosition: autoAdjustPointerLabelPosition,
1444
- pointerVanishDelay: pointerVanishDelay,
1445
- activatePointersOnLongPress: activatePointersOnLongPress,
1446
- activatePointersDelay: activatePointersDelay,
1447
- initialPointerIndex: initialPointerIndex,
1448
- initialPointerAppearDelay: initialPointerAppearDelay,
1449
- persistPointer: persistPointer,
1450
- hidePointer1: hidePointer1,
1451
- hidePointer2: hidePointer2,
1452
- hidePointer3: hidePointer3,
1453
- hidePointer4: hidePointer4,
1454
- hidePointer5: hidePointer5,
1455
- hideSecondaryPointer: hideSecondaryPointer,
1456
- resetPointerOnDataChange: resetPointerOnDataChange,
1457
- pointerEvents: pointerEvents,
1458
- disableScroll: disableScroll,
1459
- showScrollIndicator: showScrollIndicator,
1460
- focusEnabled: focusEnabled,
1461
- showDataPointOnFocus: showDataPointOnFocus,
1462
- showStripOnFocus: showStripOnFocus,
1463
- showTextOnFocus: showTextOnFocus,
1464
- stripHeight: stripHeight,
1465
- stripWidth: stripWidth,
1466
- stripColor: stripColor,
1467
- stripOpacity: stripOpacity,
1468
- unFocusOnPressOut: unFocusOnPressOut,
1469
- delayBeforeUnFocus: delayBeforeUnFocus,
1470
- containerHeightIncludingBelowXAxis: containerHeightIncludingBelowXAxis,
1471
- lineGradient: lineGradient,
1472
- lineGradientDirection: lineGradientDirection,
1473
- lineGradientStartColor: lineGradientStartColor,
1474
- lineGradientEndColor: lineGradientEndColor,
1475
- getPointerY: getPointerY,
1476
- initialisePointers: initialisePointers,
1477
- setPointerConfig: setPointerConfig,
1478
- barAndLineChartsWrapperProps: barAndLineChartsWrapperProps,
1479
- };
1480
- });
1481
- }
1482
- };
1483
- });
1484
- //# sourceMappingURL=index.js.map