gifted-charts-core 0.1.66 → 0.1.67

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.
@@ -28,11 +28,11 @@ import { AxesAndRulesDefaults, LineDefaults, chartTypes } from '../utils/constan
28
28
  import { getAxesAndRulesProps, getExtendedContainerHeightWithPadding } from '../utils';
29
29
  var initialData = null;
30
30
  export var useLineChartBiColor = function (props) {
31
- 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;
32
- var _53 = __read(useState(false), 2), toggle = _53[0], setToggle = _53[1];
33
- var _54 = __read(useState([]), 2), pointsArray = _54[0], setPointsArray = _54[1];
34
- var _55 = __read(useState([]), 2), fillPointsArray = _55[0], setFillPointsArray = _55[1];
35
- var _56 = __read(useState(-1), 2), selectedIndex = _56[0], setSelectedIndex = _56[1];
31
+ 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;
32
+ var _54 = __read(useState(false), 2), toggle = _54[0], setToggle = _54[1];
33
+ var _55 = __read(useState([]), 2), pointsArray = _55[0], setPointsArray = _55[1];
34
+ var _56 = __read(useState([]), 2), fillPointsArray = _56[0], setFillPointsArray = _56[1];
35
+ var _57 = __read(useState(-1), 2), selectedIndex = _57[0], setSelectedIndex = _57[1];
36
36
  var containerHeight = (_a = props.height) !== null && _a !== void 0 ? _a : AxesAndRulesDefaults.containerHeight;
37
37
  var noOfSections = (_b = props.noOfSections) !== null && _b !== void 0 ? _b : AxesAndRulesDefaults.noOfSections;
38
38
  var data = useMemo(function () {
@@ -48,12 +48,13 @@ export var useLineChartBiColor = function (props) {
48
48
  }
49
49
  return props.data;
50
50
  }, [props.yAxisOffset, props.data]);
51
- var scrollToEnd = (_c = props.scrollToEnd) !== null && _c !== void 0 ? _c : LineDefaults.scrollToEnd;
52
- var scrollAnimation = (_d = props.scrollAnimation) !== null && _d !== void 0 ? _d : LineDefaults.scrollAnimation;
53
- var scrollEventThrottle = (_e = props.scrollEventThrottle) !== null && _e !== void 0 ? _e : LineDefaults.scrollEventThrottle;
54
- var labelsExtraHeight = (_f = props.labelsExtraHeight) !== null && _f !== void 0 ? _f : 0;
55
- var animationDuration = (_g = props.animationDuration) !== null && _g !== void 0 ? _g : LineDefaults.animationDuration;
56
- var startIndex1 = (_h = props.startIndex) !== null && _h !== void 0 ? _h : 0;
51
+ var allowFontScaling = (_c = props.allowFontScaling) !== null && _c !== void 0 ? _c : AxesAndRulesDefaults.allowFontScaling;
52
+ var scrollToEnd = (_d = props.scrollToEnd) !== null && _d !== void 0 ? _d : LineDefaults.scrollToEnd;
53
+ var scrollAnimation = (_e = props.scrollAnimation) !== null && _e !== void 0 ? _e : LineDefaults.scrollAnimation;
54
+ var scrollEventThrottle = (_f = props.scrollEventThrottle) !== null && _f !== void 0 ? _f : LineDefaults.scrollEventThrottle;
55
+ var labelsExtraHeight = (_g = props.labelsExtraHeight) !== null && _g !== void 0 ? _g : 0;
56
+ var animationDuration = (_h = props.animationDuration) !== null && _h !== void 0 ? _h : LineDefaults.animationDuration;
57
+ var startIndex1 = (_j = props.startIndex) !== null && _j !== void 0 ? _j : 0;
57
58
  var endIndex1;
58
59
  if (props.endIndex === undefined || props.endIndex === null) {
59
60
  endIndex1 = data.length - 1;
@@ -64,23 +65,23 @@ export var useLineChartBiColor = function (props) {
64
65
  if (!initialData) {
65
66
  initialData = __spreadArray([], __read(data), false);
66
67
  }
67
- var adjustToWidth = (_j = props.adjustToWidth) !== null && _j !== void 0 ? _j : false;
68
- var initialSpacing = (_k = props.initialSpacing) !== null && _k !== void 0 ? _k : LineDefaults.initialSpacing;
69
- var endSpacing = (_l = props.endSpacing) !== null && _l !== void 0 ? _l : (adjustToWidth ? 0 : LineDefaults.endSpacing);
70
- var thickness = (_m = props.thickness) !== null && _m !== void 0 ? _m : LineDefaults.thickness;
71
- var spacing = (_o = props.spacing) !== null && _o !== void 0 ? _o : (adjustToWidth
72
- ? (((_p = props.width) !== null && _p !== void 0 ? _p : AxesAndRulesDefaults.width) - initialSpacing) /
68
+ var adjustToWidth = (_k = props.adjustToWidth) !== null && _k !== void 0 ? _k : false;
69
+ var initialSpacing = (_l = props.initialSpacing) !== null && _l !== void 0 ? _l : LineDefaults.initialSpacing;
70
+ var endSpacing = (_m = props.endSpacing) !== null && _m !== void 0 ? _m : (adjustToWidth ? 0 : LineDefaults.endSpacing);
71
+ var thickness = (_o = props.thickness) !== null && _o !== void 0 ? _o : LineDefaults.thickness;
72
+ var spacing = (_p = props.spacing) !== null && _p !== void 0 ? _p : (adjustToWidth
73
+ ? (((_q = props.width) !== null && _q !== void 0 ? _q : AxesAndRulesDefaults.width) - initialSpacing) /
73
74
  data.length
74
75
  : LineDefaults.spacing);
75
- var xAxisThickness = (_q = props.xAxisThickness) !== null && _q !== void 0 ? _q : AxesAndRulesDefaults.xAxisThickness;
76
- var dataPointsHeight1 = (_r = props.dataPointsHeight) !== null && _r !== void 0 ? _r : LineDefaults.dataPointsHeight;
77
- var dataPointsWidth1 = (_s = props.dataPointsWidth) !== null && _s !== void 0 ? _s : LineDefaults.dataPointsWidth;
78
- var dataPointsRadius1 = (_t = props.dataPointsRadius) !== null && _t !== void 0 ? _t : LineDefaults.dataPointsRadius;
79
- var dataPointsColor1 = (_u = props.dataPointsColor) !== null && _u !== void 0 ? _u : LineDefaults.dataPointsColor;
80
- var dataPointsShape1 = (_v = props.dataPointsShape) !== null && _v !== void 0 ? _v : LineDefaults.dataPointsShape;
81
- var areaChart = (_w = props.areaChart) !== null && _w !== void 0 ? _w : false;
82
- var textFontSize1 = (_x = props.textFontSize) !== null && _x !== void 0 ? _x : LineDefaults.textFontSize;
83
- var textColor1 = (_y = props.textColor) !== null && _y !== void 0 ? _y : LineDefaults.textColor;
76
+ var xAxisThickness = (_r = props.xAxisThickness) !== null && _r !== void 0 ? _r : AxesAndRulesDefaults.xAxisThickness;
77
+ var dataPointsHeight1 = (_s = props.dataPointsHeight) !== null && _s !== void 0 ? _s : LineDefaults.dataPointsHeight;
78
+ var dataPointsWidth1 = (_t = props.dataPointsWidth) !== null && _t !== void 0 ? _t : LineDefaults.dataPointsWidth;
79
+ var dataPointsRadius1 = (_u = props.dataPointsRadius) !== null && _u !== void 0 ? _u : LineDefaults.dataPointsRadius;
80
+ var dataPointsColor1 = (_v = props.dataPointsColor) !== null && _v !== void 0 ? _v : LineDefaults.dataPointsColor;
81
+ var dataPointsShape1 = (_w = props.dataPointsShape) !== null && _w !== void 0 ? _w : LineDefaults.dataPointsShape;
82
+ var areaChart = (_x = props.areaChart) !== null && _x !== void 0 ? _x : false;
83
+ var textFontSize1 = (_y = props.textFontSize) !== null && _y !== void 0 ? _y : LineDefaults.textFontSize;
84
+ var textColor1 = (_z = props.textColor) !== null && _z !== void 0 ? _z : LineDefaults.textColor;
84
85
  var totalWidth = initialSpacing + endSpacing;
85
86
  var maxItem = 0;
86
87
  var minItem = 0;
@@ -93,16 +94,16 @@ export var useLineChartBiColor = function (props) {
93
94
  }
94
95
  totalWidth += index === data.length - 1 ? 0 : spacing;
95
96
  });
96
- if ((_z = props.showFractionalValues) !== null && _z !== void 0 ? _z : props.roundToDigits) {
97
- maxItem *= 10 * ((_0 = props.roundToDigits) !== null && _0 !== void 0 ? _0 : 1);
97
+ if ((_0 = props.showFractionalValues) !== null && _0 !== void 0 ? _0 : props.roundToDigits) {
98
+ maxItem *= 10 * ((_1 = props.roundToDigits) !== null && _1 !== void 0 ? _1 : 1);
98
99
  maxItem = maxItem + (10 - (maxItem % 10));
99
- maxItem /= 10 * ((_1 = props.roundToDigits) !== null && _1 !== void 0 ? _1 : 1);
100
- maxItem = parseFloat(maxItem.toFixed((_2 = props.roundToDigits) !== null && _2 !== void 0 ? _2 : 1));
100
+ maxItem /= 10 * ((_2 = props.roundToDigits) !== null && _2 !== void 0 ? _2 : 1);
101
+ maxItem = parseFloat(maxItem.toFixed((_3 = props.roundToDigits) !== null && _3 !== void 0 ? _3 : 1));
101
102
  if (minItem !== 0) {
102
- minItem *= 10 * ((_3 = props.roundToDigits) !== null && _3 !== void 0 ? _3 : 1);
103
+ minItem *= 10 * ((_4 = props.roundToDigits) !== null && _4 !== void 0 ? _4 : 1);
103
104
  minItem = minItem - (10 + (minItem % 10));
104
- minItem /= 10 * ((_4 = props.roundToDigits) !== null && _4 !== void 0 ? _4 : 1);
105
- minItem = parseFloat(minItem.toFixed((_5 = props.roundToDigits) !== null && _5 !== void 0 ? _5 : 1));
105
+ minItem /= 10 * ((_5 = props.roundToDigits) !== null && _5 !== void 0 ? _5 : 1);
106
+ minItem = parseFloat(minItem.toFixed((_6 = props.roundToDigits) !== null && _6 !== void 0 ? _6 : 1));
106
107
  }
107
108
  }
108
109
  else {
@@ -111,8 +112,8 @@ export var useLineChartBiColor = function (props) {
111
112
  minItem = minItem - (10 + (minItem % 10));
112
113
  }
113
114
  }
114
- var maxValue = (_6 = props.maxValue) !== null && _6 !== void 0 ? _6 : maxItem;
115
- var mostNegativeValue = (_7 = props.mostNegativeValue) !== null && _7 !== void 0 ? _7 : minItem;
115
+ var maxValue = (_7 = props.maxValue) !== null && _7 !== void 0 ? _7 : maxItem;
116
+ var mostNegativeValue = (_8 = props.mostNegativeValue) !== null && _8 !== void 0 ? _8 : minItem;
116
117
  var extendedContainerHeight = getExtendedContainerHeightWithPadding(containerHeight, props.overflowTop);
117
118
  var yAtxAxis = extendedContainerHeight - xAxisThickness / 2;
118
119
  var getX = function (index) { return initialSpacing + spacing * index; };
@@ -310,67 +311,67 @@ export var useLineChartBiColor = function (props) {
310
311
  maxValue
311
312
  ]);
312
313
  var horizSections = [{ value: '0' }];
313
- var stepHeight = (_8 = props.stepHeight) !== null && _8 !== void 0 ? _8 : containerHeight / noOfSections;
314
- var stepValue = (_9 = props.stepValue) !== null && _9 !== void 0 ? _9 : maxValue / noOfSections;
315
- var noOfSectionsBelowXAxis = (_10 = props.noOfSectionsBelowXAxis) !== null && _10 !== void 0 ? _10 : Math.round(Math.ceil(-mostNegativeValue / stepValue));
316
- var thickness1 = (_11 = props.thickness) !== null && _11 !== void 0 ? _11 : LineDefaults.thickness;
317
- var zIndex = (_12 = props.zIndex) !== null && _12 !== void 0 ? _12 : 0;
314
+ var stepHeight = (_9 = props.stepHeight) !== null && _9 !== void 0 ? _9 : containerHeight / noOfSections;
315
+ var stepValue = (_10 = props.stepValue) !== null && _10 !== void 0 ? _10 : maxValue / noOfSections;
316
+ var noOfSectionsBelowXAxis = (_11 = props.noOfSectionsBelowXAxis) !== null && _11 !== void 0 ? _11 : Math.round(Math.ceil(-mostNegativeValue / stepValue));
317
+ var thickness1 = (_12 = props.thickness) !== null && _12 !== void 0 ? _12 : LineDefaults.thickness;
318
+ var zIndex = (_13 = props.zIndex) !== null && _13 !== void 0 ? _13 : 0;
318
319
  var strokeDashArray1 = props.strokeDashArray;
319
- var rotateLabel = (_13 = props.rotateLabel) !== null && _13 !== void 0 ? _13 : AxesAndRulesDefaults.rotateLabel;
320
- var isAnimated = (_14 = props.isAnimated) !== null && _14 !== void 0 ? _14 : LineDefaults.isAnimated;
321
- var hideDataPoints1 = (_15 = props.hideDataPoints) !== null && _15 !== void 0 ? _15 : LineDefaults.hideDataPoints;
322
- var color = (_16 = props.color) !== null && _16 !== void 0 ? _16 : 'green';
323
- var colorNegative = (_17 = props.colorNegative) !== null && _17 !== void 0 ? _17 : 'red';
324
- var startFillColor = (_18 = props.startFillColor) !== null && _18 !== void 0 ? _18 : 'lightgreen';
325
- var endFillColor = (_19 = props.endFillColor) !== null && _19 !== void 0 ? _19 : 'white';
326
- var startOpacity = (_20 = props.startOpacity) !== null && _20 !== void 0 ? _20 : LineDefaults.startOpacity;
327
- var endOpacity = (_21 = props.endOpacity) !== null && _21 !== void 0 ? _21 : LineDefaults.endOpacity;
328
- var startFillColorNegative = (_22 = props.startFillColorNegative) !== null && _22 !== void 0 ? _22 : 'pink';
329
- var endFillColorNegative = (_23 = props.endFillColorNegative) !== null && _23 !== void 0 ? _23 : 'white';
330
- var startOpacityNegative = (_24 = props.startOpacityNegative) !== null && _24 !== void 0 ? _24 : LineDefaults.startOpacity;
331
- var endOpacityNegative = (_25 = props.endOpacityNegative) !== null && _25 !== void 0 ? _25 : LineDefaults.endOpacity;
332
- var gradientDirection = (_26 = props.gradientDirection) !== null && _26 !== void 0 ? _26 : 'vertical';
333
- var showXAxisIndices = (_27 = props.showXAxisIndices) !== null && _27 !== void 0 ? _27 : AxesAndRulesDefaults.showXAxisIndices;
334
- var xAxisIndicesHeight = (_28 = props.xAxisIndicesHeight) !== null && _28 !== void 0 ? _28 : AxesAndRulesDefaults.xAxisIndicesHeight;
335
- var xAxisIndicesWidth = (_29 = props.xAxisIndicesWidth) !== null && _29 !== void 0 ? _29 : AxesAndRulesDefaults.xAxisIndicesWidth;
336
- var xAxisIndicesColor = (_30 = props.xAxisIndicesColor) !== null && _30 !== void 0 ? _30 : AxesAndRulesDefaults.xAxisIndicesColor;
337
- var xAxisTextNumberOfLines = (_31 = props.xAxisTextNumberOfLines) !== null && _31 !== void 0 ? _31 : AxesAndRulesDefaults.xAxisTextNumberOfLines;
320
+ var rotateLabel = (_14 = props.rotateLabel) !== null && _14 !== void 0 ? _14 : AxesAndRulesDefaults.rotateLabel;
321
+ var isAnimated = (_15 = props.isAnimated) !== null && _15 !== void 0 ? _15 : LineDefaults.isAnimated;
322
+ var hideDataPoints1 = (_16 = props.hideDataPoints) !== null && _16 !== void 0 ? _16 : LineDefaults.hideDataPoints;
323
+ var color = (_17 = props.color) !== null && _17 !== void 0 ? _17 : 'green';
324
+ var colorNegative = (_18 = props.colorNegative) !== null && _18 !== void 0 ? _18 : 'red';
325
+ var startFillColor = (_19 = props.startFillColor) !== null && _19 !== void 0 ? _19 : 'lightgreen';
326
+ var endFillColor = (_20 = props.endFillColor) !== null && _20 !== void 0 ? _20 : 'white';
327
+ var startOpacity = (_21 = props.startOpacity) !== null && _21 !== void 0 ? _21 : LineDefaults.startOpacity;
328
+ var endOpacity = (_22 = props.endOpacity) !== null && _22 !== void 0 ? _22 : LineDefaults.endOpacity;
329
+ var startFillColorNegative = (_23 = props.startFillColorNegative) !== null && _23 !== void 0 ? _23 : 'pink';
330
+ var endFillColorNegative = (_24 = props.endFillColorNegative) !== null && _24 !== void 0 ? _24 : 'white';
331
+ var startOpacityNegative = (_25 = props.startOpacityNegative) !== null && _25 !== void 0 ? _25 : LineDefaults.startOpacity;
332
+ var endOpacityNegative = (_26 = props.endOpacityNegative) !== null && _26 !== void 0 ? _26 : LineDefaults.endOpacity;
333
+ var gradientDirection = (_27 = props.gradientDirection) !== null && _27 !== void 0 ? _27 : 'vertical';
334
+ var showXAxisIndices = (_28 = props.showXAxisIndices) !== null && _28 !== void 0 ? _28 : AxesAndRulesDefaults.showXAxisIndices;
335
+ var xAxisIndicesHeight = (_29 = props.xAxisIndicesHeight) !== null && _29 !== void 0 ? _29 : AxesAndRulesDefaults.xAxisIndicesHeight;
336
+ var xAxisIndicesWidth = (_30 = props.xAxisIndicesWidth) !== null && _30 !== void 0 ? _30 : AxesAndRulesDefaults.xAxisIndicesWidth;
337
+ var xAxisIndicesColor = (_31 = props.xAxisIndicesColor) !== null && _31 !== void 0 ? _31 : AxesAndRulesDefaults.xAxisIndicesColor;
338
+ var xAxisTextNumberOfLines = (_32 = props.xAxisTextNumberOfLines) !== null && _32 !== void 0 ? _32 : AxesAndRulesDefaults.xAxisTextNumberOfLines;
338
339
  var horizontalRulesStyle = props.horizontalRulesStyle;
339
- var showFractionalValues = (_32 = props.showFractionalValues) !== null && _32 !== void 0 ? _32 : AxesAndRulesDefaults.showFractionalValues;
340
- var yAxisLabelWidth = (_33 = props.yAxisLabelWidth) !== null && _33 !== void 0 ? _33 : (props.hideYAxisText
340
+ var showFractionalValues = (_33 = props.showFractionalValues) !== null && _33 !== void 0 ? _33 : AxesAndRulesDefaults.showFractionalValues;
341
+ var yAxisLabelWidth = (_34 = props.yAxisLabelWidth) !== null && _34 !== void 0 ? _34 : (props.hideYAxisText
341
342
  ? AxesAndRulesDefaults.yAxisEmptyLabelWidth
342
343
  : AxesAndRulesDefaults.yAxisLabelWidth);
343
344
  var yAxisExtraHeightAtTop = props.trimYAxisAtTop
344
345
  ? 0
345
- : (_34 = props.yAxisExtraHeight) !== null && _34 !== void 0 ? _34 : containerHeight / 20;
346
+ : (_35 = props.yAxisExtraHeight) !== null && _35 !== void 0 ? _35 : containerHeight / 20;
346
347
  var horizontal = false;
347
348
  var yAxisAtTop = false;
348
- var disableScroll = (_35 = props.disableScroll) !== null && _35 !== void 0 ? _35 : LineDefaults.disableScroll;
349
- var showScrollIndicator = (_36 = props.showScrollIndicator) !== null && _36 !== void 0 ? _36 : LineDefaults.showScrollIndicator;
350
- var focusEnabled = (_37 = props.focusEnabled) !== null && _37 !== void 0 ? _37 : LineDefaults.focusEnabled;
351
- var showDataPointOnFocus = (_38 = props.showDataPointOnFocus) !== null && _38 !== void 0 ? _38 : LineDefaults.showDataPointOnFocus;
352
- var showStripOnFocus = (_39 = props.showStripOnFocus) !== null && _39 !== void 0 ? _39 : LineDefaults.showStripOnFocus;
353
- var showTextOnFocus = (_40 = props.showTextOnFocus) !== null && _40 !== void 0 ? _40 : LineDefaults.showTextOnFocus;
349
+ var disableScroll = (_36 = props.disableScroll) !== null && _36 !== void 0 ? _36 : LineDefaults.disableScroll;
350
+ var showScrollIndicator = (_37 = props.showScrollIndicator) !== null && _37 !== void 0 ? _37 : LineDefaults.showScrollIndicator;
351
+ var focusEnabled = (_38 = props.focusEnabled) !== null && _38 !== void 0 ? _38 : LineDefaults.focusEnabled;
352
+ var showDataPointOnFocus = (_39 = props.showDataPointOnFocus) !== null && _39 !== void 0 ? _39 : LineDefaults.showDataPointOnFocus;
353
+ var showStripOnFocus = (_40 = props.showStripOnFocus) !== null && _40 !== void 0 ? _40 : LineDefaults.showStripOnFocus;
354
+ var showTextOnFocus = (_41 = props.showTextOnFocus) !== null && _41 !== void 0 ? _41 : LineDefaults.showTextOnFocus;
354
355
  var stripHeight = props.stripHeight;
355
- var stripWidth = (_41 = props.stripWidth) !== null && _41 !== void 0 ? _41 : LineDefaults.stripWidth;
356
- var stripColor = (_42 = props.stripColor) !== null && _42 !== void 0 ? _42 : color;
357
- var stripOpacity = (_43 = props.stripOpacity) !== null && _43 !== void 0 ? _43 : (startOpacity + endOpacity) / 2;
358
- var unFocusOnPressOut = (_44 = props.unFocusOnPressOut) !== null && _44 !== void 0 ? _44 : LineDefaults.unFocusOnPressOut;
359
- var delayBeforeUnFocus = (_45 = props.delayBeforeUnFocus) !== null && _45 !== void 0 ? _45 : LineDefaults.delayBeforeUnFocus;
356
+ var stripWidth = (_42 = props.stripWidth) !== null && _42 !== void 0 ? _42 : LineDefaults.stripWidth;
357
+ var stripColor = (_43 = props.stripColor) !== null && _43 !== void 0 ? _43 : color;
358
+ var stripOpacity = (_44 = props.stripOpacity) !== null && _44 !== void 0 ? _44 : (startOpacity + endOpacity) / 2;
359
+ var unFocusOnPressOut = (_45 = props.unFocusOnPressOut) !== null && _45 !== void 0 ? _45 : LineDefaults.unFocusOnPressOut;
360
+ var delayBeforeUnFocus = (_46 = props.delayBeforeUnFocus) !== null && _46 !== void 0 ? _46 : LineDefaults.delayBeforeUnFocus;
360
361
  horizSections.pop();
361
362
  for (var i = 0; i <= noOfSections; i++) {
362
363
  var value = maxValue - stepValue * i;
363
- if ((_46 = props.showFractionalValues) !== null && _46 !== void 0 ? _46 : props.roundToDigits) {
364
- value = parseFloat(value.toFixed((_47 = props.roundToDigits) !== null && _47 !== void 0 ? _47 : 1));
364
+ if ((_47 = props.showFractionalValues) !== null && _47 !== void 0 ? _47 : props.roundToDigits) {
365
+ value = parseFloat(value.toFixed((_48 = props.roundToDigits) !== null && _48 !== void 0 ? _48 : 1));
365
366
  }
366
367
  horizSections.push({
367
368
  value: props.yAxisLabelTexts
368
- ? (_48 = props.yAxisLabelTexts[noOfSections - i]) !== null && _48 !== void 0 ? _48 : value.toString()
369
+ ? (_49 = props.yAxisLabelTexts[noOfSections - i]) !== null && _49 !== void 0 ? _49 : value.toString()
369
370
  : value.toString()
370
371
  });
371
372
  }
372
- var dataPointsRadius = (_49 = props.dataPointsRadius) !== null && _49 !== void 0 ? _49 : LineDefaults.dataPointsRadius;
373
- var dataPointsWidth = (_50 = props.dataPointsWidth) !== null && _50 !== void 0 ? _50 : LineDefaults.dataPointsWidth;
373
+ var dataPointsRadius = (_50 = props.dataPointsRadius) !== null && _50 !== void 0 ? _50 : LineDefaults.dataPointsRadius;
374
+ var dataPointsWidth = (_51 = props.dataPointsWidth) !== null && _51 !== void 0 ? _51 : LineDefaults.dataPointsWidth;
374
375
  var extraWidthDueToDataPoint = props.hideDataPoints
375
376
  ? 0
376
377
  : dataPointsRadius !== null && dataPointsRadius !== void 0 ? dataPointsRadius : dataPointsWidth;
@@ -422,7 +423,7 @@ export var useLineChartBiColor = function (props) {
422
423
  horizontalRulesStyle: horizontalRulesStyle,
423
424
  noOfSections: noOfSections,
424
425
  showFractionalValues: showFractionalValues,
425
- axesAndRulesProps: getAxesAndRulesProps(props, containerHeight, stepHeight, stepValue, noOfSections, (_51 = props.roundToDigits) !== null && _51 !== void 0 ? _51 : 0, stepValue, 0, 0, false, 0),
426
+ axesAndRulesProps: getAxesAndRulesProps(props, containerHeight, stepHeight, stepValue, noOfSections, (_52 = props.roundToDigits) !== null && _52 !== void 0 ? _52 : 0, stepValue, 0, 0, false, 0),
426
427
  yAxisLabelTexts: props.yAxisLabelTexts,
427
428
  yAxisOffset: props.yAxisOffset,
428
429
  rotateYAxisTexts: 0,
@@ -437,12 +438,14 @@ export var useLineChartBiColor = function (props) {
437
438
  pointerIndex: 0,
438
439
  pointerX: 0,
439
440
  pointerY: 0,
440
- endReachedOffset: (_52 = props.endReachedOffset) !== null && _52 !== void 0 ? _52 : LineDefaults.endReachedOffset,
441
+ endReachedOffset: (_53 = props.endReachedOffset) !== null && _53 !== void 0 ? _53 : LineDefaults.endReachedOffset,
441
442
  extraWidthDueToDataPoint: extraWidthDueToDataPoint,
442
443
  highlightEnabled: LineDefaults.highlightEnabled,
443
444
  lowlightOpacity: LineDefaults.lowlightOpacity,
444
445
  xAxisLabelsAtBottom: false,
445
- onScrollEndDrag: props.onScrollEndDrag
446
+ onScrollEndDrag: props.onScrollEndDrag,
447
+ floatingYAxisLabels: props.floatingYAxisLabels,
448
+ allowFontScaling: allowFontScaling
446
449
  };
447
450
  return {
448
451
  toggle: toggle,
@@ -531,6 +534,7 @@ export var useLineChartBiColor = function (props) {
531
534
  delayBeforeUnFocus: delayBeforeUnFocus,
532
535
  horizSections: horizSections,
533
536
  barAndLineChartsWrapperProps: barAndLineChartsWrapperProps,
534
- yAxisExtraHeightAtTop: yAxisExtraHeightAtTop
537
+ yAxisExtraHeightAtTop: yAxisExtraHeightAtTop,
538
+ allowFontScaling: allowFontScaling
535
539
  };
536
540
  };
@@ -314,8 +314,8 @@ export declare const useLineChart: (props: extendedLineChartPropsType) => {
314
314
  arrowConfig: import("../utils/types").arrowConfigType | undefined;
315
315
  };
316
316
  addLeadingAndTrailingPathForAreaFill: (initialPath: string, value: number, dataLength: number) => string;
317
- getNextPoint: (data: lineDataItemNullSafe[], index: number, around: boolean, before: boolean, spacingArray: number[]) => string;
318
- getStepPath: (data: lineDataItemNullSafe[], i: number, spacingArray: number[], lineSegment: LineSegment[] | undefined) => string;
317
+ getNextPoint: (data: lineDataItemNullSafe[], index: number, around: boolean, before: boolean, spacingArray: number[], isSecondary?: boolean) => string;
318
+ getStepPath: (data: lineDataItemNullSafe[], i: number, spacingArray: number[], lineSegment: LineSegment[] | undefined, isSecondary?: boolean) => string;
319
319
  getSegmentPath: (data: lineDataItemNullSafe[], i: number, lineSegment: LineSegment[] | undefined, startIndex: number, endIndex: number, spacingArray: number[], isSecondary?: boolean) => string;
320
320
  gradientDirection: string;
321
321
  horizSections: {
@@ -419,4 +419,5 @@ export declare const useLineChart: (props: extendedLineChartPropsType) => {
419
419
  renderTooltip5: Function | undefined;
420
420
  renderTooltipSecondary: Function | undefined;
421
421
  pointerItemLocal: any[];
422
+ allowFontScaling: boolean;
422
423
  };