gifted-charts-core 0.1.66 → 0.1.68

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.
@@ -205,4 +205,5 @@ export declare const useBarChart: (props: extendedBarChartPropsType) => {
205
205
  yAxisExtraHeightAtTop: number;
206
206
  selectedStackIndex: number;
207
207
  setSelectedStackIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
208
+ allowFontScaling: boolean;
208
209
  };
@@ -29,19 +29,20 @@ import { useEffect, useMemo, useState } from 'react';
29
29
  import { getArrowPoints, getAxesAndRulesProps, getExtendedContainerHeightWithPadding, getLineConfigForBarChart, getMaxValue, getMostNegativeValue, getNoOfSections, getXForLineInBar, getYForLineInBar, indexOfFirstNonZeroDigit, maxAndMinUtil, svgPath } from '../utils';
30
30
  import { AxesAndRulesDefaults, BarDefaults, chartTypes, defaultLineConfig, defaultPointerConfig } from '../utils/constants';
31
31
  export var useBarChart = function (props) {
32
- 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;
33
- var heightValue = props.heightValue, widthValue = props.widthValue, opacityValue = props.opacityValue, yAxisOffset = props.yAxisOffset, adjustToWidth = props.adjustToWidth, parentWidth = props.parentWidth, labelsDistanceFromXaxis = props.labelsDistanceFromXaxis, autoShiftLabelsForNegativeStacks = props.autoShiftLabelsForNegativeStacks, focusedBarIndex = props.focusedBarIndex, negativeStepValue = props.negativeStepValue, autoCenterTooltip = props.autoCenterTooltip;
34
- var _69 = __read(useState(''), 2), points = _69[0], setPoints = _69[1];
35
- var _70 = __read(useState(''), 2), points2 = _70[0], setPoints2 = _70[1];
36
- var _71 = __read(useState(''), 2), arrowPoints = _71[0], setArrowPoints = _71[1];
37
- var _72 = __read(useState(function () {
32
+ 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;
33
+ var heightValue = props.heightValue, widthValue = props.widthValue, opacityValue = props.opacityValue, yAxisOffset = props.yAxisOffset, adjustToWidth = props.adjustToWidth, parentWidth = props.parentWidth, labelsDistanceFromXaxis = props.labelsDistanceFromXaxis, autoShiftLabelsForNegativeStacks = props.autoShiftLabelsForNegativeStacks, focusedBarIndex = props.focusedBarIndex, negativeStepValue = props.negativeStepValue, autoCenterTooltip = props.autoCenterTooltip, floatingYAxisLabels = props.floatingYAxisLabels;
34
+ var allowFontScaling = (_a = props.allowFontScaling) !== null && _a !== void 0 ? _a : AxesAndRulesDefaults.allowFontScaling;
35
+ var _70 = __read(useState(''), 2), points = _70[0], setPoints = _70[1];
36
+ var _71 = __read(useState(''), 2), points2 = _71[0], setPoints2 = _71[1];
37
+ var _72 = __read(useState(''), 2), arrowPoints = _72[0], setArrowPoints = _72[1];
38
+ var _73 = __read(useState(function () {
38
39
  if (Array.isArray(focusedBarIndex)) {
39
40
  return focusedBarIndex;
40
41
  }
41
42
  return [focusedBarIndex !== null && focusedBarIndex !== void 0 ? focusedBarIndex : -1];
42
- }), 2), selectedIndex = _72[0], setSelectedIndex = _72[1];
43
- var _73 = __read(useState((_a = props.highlightedStackIndex) !== null && _a !== void 0 ? _a : -1), 2), selectedStackIndex = _73[0], setSelectedStackIndex = _73[1];
44
- var showLine = (_b = props.showLine) !== null && _b !== void 0 ? _b : BarDefaults.showLine;
43
+ }), 2), selectedIndex = _73[0], setSelectedIndex = _73[1];
44
+ var _74 = __read(useState((_b = props.highlightedStackIndex) !== null && _b !== void 0 ? _b : -1), 2), selectedStackIndex = _74[0], setSelectedStackIndex = _74[1];
45
+ var showLine = (_c = props.showLine) !== null && _c !== void 0 ? _c : BarDefaults.showLine;
45
46
  useEffect(function () {
46
47
  var newIndex = Array.isArray(focusedBarIndex)
47
48
  ? focusedBarIndex
@@ -52,10 +53,10 @@ export var useBarChart = function (props) {
52
53
  var _a;
53
54
  setSelectedStackIndex((_a = props.highlightedStackIndex) !== null && _a !== void 0 ? _a : -1);
54
55
  }, [props.highlightedStackIndex]);
55
- var highlightEnabled = (_c = props.highlightEnabled) !== null && _c !== void 0 ? _c : BarDefaults.highlightEnabled;
56
- var highlightedBarIndex = (_d = props.highlightedBarIndex) !== null && _d !== void 0 ? _d : selectedIndex;
57
- var lowlightOpacity = (_e = props.lowlightOpacity) !== null && _e !== void 0 ? _e : BarDefaults.lowlightOpacity;
58
- var stackHighlightEnabled = (_f = props.stackHighlightEnabled) !== null && _f !== void 0 ? _f : BarDefaults.stackHighlightEnabled;
56
+ var highlightEnabled = (_d = props.highlightEnabled) !== null && _d !== void 0 ? _d : BarDefaults.highlightEnabled;
57
+ var highlightedBarIndex = (_e = props.highlightedBarIndex) !== null && _e !== void 0 ? _e : selectedIndex;
58
+ var lowlightOpacity = (_f = props.lowlightOpacity) !== null && _f !== void 0 ? _f : BarDefaults.lowlightOpacity;
59
+ var stackHighlightEnabled = (_g = props.stackHighlightEnabled) !== null && _g !== void 0 ? _g : BarDefaults.stackHighlightEnabled;
59
60
  var data = useMemo(function () {
60
61
  if (!props.data) {
61
62
  return [];
@@ -94,8 +95,8 @@ export var useBarChart = function (props) {
94
95
  return props.stackData;
95
96
  }, [yAxisOffset, props.stackData]);
96
97
  // adjustToWidth should work for data or stacked data
97
- var dataLength = (_k = (_h = (_g = props.data) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : (_j = props.stackData) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0;
98
- var yAxisLabelWidth = (_l = props.yAxisLabelWidth) !== null && _l !== void 0 ? _l : (props.hideYAxisText
98
+ var dataLength = (_l = (_j = (_h = props.data) === null || _h === void 0 ? void 0 : _h.length) !== null && _j !== void 0 ? _j : (_k = props.stackData) === null || _k === void 0 ? void 0 : _k.length) !== null && _l !== void 0 ? _l : 0;
99
+ var yAxisLabelWidth = (_m = props.yAxisLabelWidth) !== null && _m !== void 0 ? _m : (props.hideYAxisText
99
100
  ? AxesAndRulesDefaults.yAxisEmptyLabelWidth
100
101
  : AxesAndRulesDefaults.yAxisLabelWidth);
101
102
  var autoComputedSectionWidth = props.initialSpacing !== undefined
@@ -105,19 +106,19 @@ export var useBarChart = function (props) {
105
106
  var defaultBarWidth = adjustToWidth
106
107
  ? autoComputedBarWidth
107
108
  : BarDefaults.barWidth;
108
- var barWidth = (_m = props.barWidth) !== null && _m !== void 0 ? _m : defaultBarWidth;
109
+ var barWidth = (_o = props.barWidth) !== null && _o !== void 0 ? _o : defaultBarWidth;
109
110
  var autoComputedSpacing = autoComputedSectionWidth * 0.4;
110
- var spacing = (_o = props.spacing) !== null && _o !== void 0 ? _o : (adjustToWidth ? autoComputedSpacing : BarDefaults.spacing);
111
- var initialSpacing = (_p = props.initialSpacing) !== null && _p !== void 0 ? _p : spacing;
112
- var endSpacing = (_q = props.endSpacing) !== null && _q !== void 0 ? _q : spacing;
113
- var horizontal = (_r = props.horizontal) !== null && _r !== void 0 ? _r : BarDefaults.horizontal;
114
- var rtl = (_s = props.rtl) !== null && _s !== void 0 ? _s : BarDefaults.rtl;
115
- var yAxisAtTop = (_t = props.yAxisAtTop) !== null && _t !== void 0 ? _t : BarDefaults.yAxisAtTop;
116
- var intactTopLabel = (_u = props.intactTopLabel) !== null && _u !== void 0 ? _u : BarDefaults.intactTopLabel;
111
+ var spacing = (_p = props.spacing) !== null && _p !== void 0 ? _p : (adjustToWidth ? autoComputedSpacing : BarDefaults.spacing);
112
+ var initialSpacing = (_q = props.initialSpacing) !== null && _q !== void 0 ? _q : spacing;
113
+ var endSpacing = (_r = props.endSpacing) !== null && _r !== void 0 ? _r : spacing;
114
+ var horizontal = (_s = props.horizontal) !== null && _s !== void 0 ? _s : BarDefaults.horizontal;
115
+ var rtl = (_t = props.rtl) !== null && _t !== void 0 ? _t : BarDefaults.rtl;
116
+ var yAxisAtTop = (_u = props.yAxisAtTop) !== null && _u !== void 0 ? _u : BarDefaults.yAxisAtTop;
117
+ var intactTopLabel = (_v = props.intactTopLabel) !== null && _v !== void 0 ? _v : BarDefaults.intactTopLabel;
117
118
  var heightFromProps = horizontal ? props.width : props.height;
118
119
  var widthFromProps = horizontal ? props.height : props.width;
119
- var isAnimated = (_v = props.isAnimated) !== null && _v !== void 0 ? _v : BarDefaults.isAnimated;
120
- var animationDuration = (_w = props.animationDuration) !== null && _w !== void 0 ? _w : BarDefaults.animationDuration;
120
+ var isAnimated = (_w = props.isAnimated) !== null && _w !== void 0 ? _w : BarDefaults.isAnimated;
121
+ var animationDuration = (_x = props.animationDuration) !== null && _x !== void 0 ? _x : BarDefaults.animationDuration;
121
122
  // const secondaryData = getSecondaryDataWithOffsetIncluded(
122
123
  // props.secondaryData,
123
124
  // props.secondaryYAxis
@@ -135,7 +136,7 @@ export var useBarChart = function (props) {
135
136
  return props.lineData;
136
137
  }, [yAxisOffset, props.lineData, data, stackData]);
137
138
  var lineData2 = props.lineData2;
138
- var lineBehindBars = (_x = props.lineBehindBars) !== null && _x !== void 0 ? _x : BarDefaults.lineBehindBars;
139
+ var lineBehindBars = (_y = props.lineBehindBars) !== null && _y !== void 0 ? _y : BarDefaults.lineBehindBars;
139
140
  defaultLineConfig.initialSpacing = initialSpacing;
140
141
  defaultLineConfig.endIndex = lineData.length - 1;
141
142
  defaultLineConfig.animationDuration = animationDuration;
@@ -150,12 +151,12 @@ export var useBarChart = function (props) {
150
151
  ? props.stepHeight * noOfSections
151
152
  : AxesAndRulesDefaults.containerHeight);
152
153
  var horizSections = [{ value: '0' }];
153
- var stepHeight = (_y = props.stepHeight) !== null && _y !== void 0 ? _y : containerHeight / noOfSections;
154
- var labelWidth = (_z = props.labelWidth) !== null && _z !== void 0 ? _z : AxesAndRulesDefaults.labelWidth;
155
- var scrollToEnd = (_0 = props.scrollToEnd) !== null && _0 !== void 0 ? _0 : BarDefaults.scrollToEnd;
156
- var scrollAnimation = (_1 = props.scrollAnimation) !== null && _1 !== void 0 ? _1 : BarDefaults.scrollAnimation;
157
- var scrollEventThrottle = (_2 = props.scrollEventThrottle) !== null && _2 !== void 0 ? _2 : BarDefaults.scrollEventThrottle;
158
- var labelsExtraHeight = (_3 = props.labelsExtraHeight) !== null && _3 !== void 0 ? _3 : AxesAndRulesDefaults.labelsExtraHeight;
154
+ var stepHeight = (_z = props.stepHeight) !== null && _z !== void 0 ? _z : containerHeight / noOfSections;
155
+ var labelWidth = (_0 = props.labelWidth) !== null && _0 !== void 0 ? _0 : AxesAndRulesDefaults.labelWidth;
156
+ var scrollToEnd = (_1 = props.scrollToEnd) !== null && _1 !== void 0 ? _1 : BarDefaults.scrollToEnd;
157
+ var scrollAnimation = (_2 = props.scrollAnimation) !== null && _2 !== void 0 ? _2 : BarDefaults.scrollAnimation;
158
+ var scrollEventThrottle = (_3 = props.scrollEventThrottle) !== null && _3 !== void 0 ? _3 : BarDefaults.scrollEventThrottle;
159
+ var labelsExtraHeight = (_4 = props.labelsExtraHeight) !== null && _4 !== void 0 ? _4 : AxesAndRulesDefaults.labelsExtraHeight;
159
160
  var secondaryMaxItem = 0;
160
161
  var secondaryMinItem = 0;
161
162
  if (lineConfig.isSecondary) {
@@ -231,13 +232,13 @@ export var useBarChart = function (props) {
231
232
  });
232
233
  }
233
234
  var valuesRange = maxItem - minPositiveItem; // Diff bw largest & smallest +ve values
234
- var showFractionalValues = (_4 = props.showFractionalValues) !== null && _4 !== void 0 ? _4 : valuesRange <= 1;
235
- var roundToDigits = (_5 = props.roundToDigits) !== null && _5 !== void 0 ? _5 : (showFractionalValues ? indexOfFirstNonZeroDigit(valuesRange) + 1 : 0);
235
+ var showFractionalValues = (_5 = props.showFractionalValues) !== null && _5 !== void 0 ? _5 : valuesRange <= 1;
236
+ var roundToDigits = (_6 = props.roundToDigits) !== null && _6 !== void 0 ? _6 : (showFractionalValues ? indexOfFirstNonZeroDigit(valuesRange) + 1 : 0);
236
237
  var maxAndMin = maxAndMinUtil(maxItem, minItem, roundToDigits, showFractionalValues);
237
238
  var maxValue = getMaxValue(props.maxValue, props.stepValue, noOfSections, maxAndMin.maxItem) || 10;
238
239
  var secondaryRange = secondaryMaxItem - secondaryMinPositiveItem; // Diff bw largest & smallest +ve values
239
- var showSecondaryFractionalValues = (_7 = (_6 = props.secondaryYAxis) === null || _6 === void 0 ? void 0 : _6.showFractionalValues) !== null && _7 !== void 0 ? _7 : secondaryRange <= 1;
240
- var secondaryRoundToDigits = (_9 = (_8 = props.secondaryYAxis) === null || _8 === void 0 ? void 0 : _8.roundToDigits) !== null && _9 !== void 0 ? _9 : (showSecondaryFractionalValues
240
+ var showSecondaryFractionalValues = (_8 = (_7 = props.secondaryYAxis) === null || _7 === void 0 ? void 0 : _7.showFractionalValues) !== null && _8 !== void 0 ? _8 : secondaryRange <= 1;
241
+ var secondaryRoundToDigits = (_10 = (_9 = props.secondaryYAxis) === null || _9 === void 0 ? void 0 : _9.roundToDigits) !== null && _10 !== void 0 ? _10 : (showSecondaryFractionalValues
241
242
  ? indexOfFirstNonZeroDigit(secondaryRange) + 1
242
243
  : 0);
243
244
  var secondaryMaxAndMin = maxAndMinUtil(secondaryMaxItem, secondaryMinItem, secondaryRoundToDigits, showSecondaryFractionalValues);
@@ -247,88 +248,88 @@ export var useBarChart = function (props) {
247
248
  // secondaryMaxAndMin.maxItem
248
249
  // : secondaryMaxAndMin.maxItem
249
250
  // : maxValue
250
- var secondaryMaxValue = (_11 = (_10 = props.secondaryYAxis) === null || _10 === void 0 ? void 0 : _10.maxValue) !== null && _11 !== void 0 ? _11 : secondaryMaxAndMin.maxItem;
251
+ var secondaryMaxValue = (_12 = (_11 = props.secondaryYAxis) === null || _11 === void 0 ? void 0 : _11.maxValue) !== null && _12 !== void 0 ? _12 : secondaryMaxAndMin.maxItem;
251
252
  var mostNegativeValue = getMostNegativeValue(props.mostNegativeValue, props.negativeStepValue, props.noOfSectionsBelowXAxis, maxAndMin.minItem);
252
- var stepValue = (_12 = props.stepValue) !== null && _12 !== void 0 ? _12 : maxValue / noOfSections;
253
+ var stepValue = (_13 = props.stepValue) !== null && _13 !== void 0 ? _13 : maxValue / noOfSections;
253
254
  var effectiveNegativeStepValue = negativeStepValue !== null && negativeStepValue !== void 0 ? negativeStepValue : stepValue;
254
- var noOfSectionsBelowXAxis = (_13 = props.noOfSectionsBelowXAxis) !== null && _13 !== void 0 ? _13 : (effectiveNegativeStepValue
255
+ var noOfSectionsBelowXAxis = (_14 = props.noOfSectionsBelowXAxis) !== null && _14 !== void 0 ? _14 : (effectiveNegativeStepValue
255
256
  ? Math.round(Math.ceil(-mostNegativeValue / effectiveNegativeStepValue))
256
257
  : 0);
257
- var showScrollIndicator = (_14 = props.showScrollIndicator) !== null && _14 !== void 0 ? _14 : BarDefaults.showScrollIndicator;
258
- var side = (_15 = props.side) !== null && _15 !== void 0 ? _15 : BarDefaults.side;
259
- var rotateLabel = (_16 = props.rotateLabel) !== null && _16 !== void 0 ? _16 : AxesAndRulesDefaults.rotateLabel;
260
- var opacity = (_17 = props.opacity) !== null && _17 !== void 0 ? _17 : BarDefaults.opacity;
261
- var isThreeD = (_18 = props.isThreeD) !== null && _18 !== void 0 ? _18 : BarDefaults.isThreeD;
262
- var showXAxisIndices = (_19 = props.showXAxisIndices) !== null && _19 !== void 0 ? _19 : AxesAndRulesDefaults.showXAxisIndices;
263
- var xAxisIndicesHeight = (_20 = props.xAxisIndicesHeight) !== null && _20 !== void 0 ? _20 : AxesAndRulesDefaults.xAxisIndicesHeight;
264
- var xAxisIndicesWidth = (_21 = props.xAxisIndicesWidth) !== null && _21 !== void 0 ? _21 : AxesAndRulesDefaults.xAxisIndicesWidth;
265
- var xAxisIndicesColor = (_22 = props.xAxisIndicesColor) !== null && _22 !== void 0 ? _22 : AxesAndRulesDefaults.xAxisIndicesColor;
266
- var xAxisThickness = (_23 = props.xAxisThickness) !== null && _23 !== void 0 ? _23 : AxesAndRulesDefaults.xAxisThickness;
267
- var xAxisTextNumberOfLines = (_24 = props.xAxisTextNumberOfLines) !== null && _24 !== void 0 ? _24 : AxesAndRulesDefaults.xAxisTextNumberOfLines;
268
- var xAxisLabelsVerticalShift = (_25 = props.xAxisLabelsVerticalShift) !== null && _25 !== void 0 ? _25 : AxesAndRulesDefaults.xAxisLabelsVerticalShift;
269
- var xAxisLabelsAtBottom = (_26 = props.xAxisLabelsAtBottom) !== null && _26 !== void 0 ? _26 : false;
258
+ var showScrollIndicator = (_15 = props.showScrollIndicator) !== null && _15 !== void 0 ? _15 : BarDefaults.showScrollIndicator;
259
+ var side = (_16 = props.side) !== null && _16 !== void 0 ? _16 : BarDefaults.side;
260
+ var rotateLabel = (_17 = props.rotateLabel) !== null && _17 !== void 0 ? _17 : AxesAndRulesDefaults.rotateLabel;
261
+ var opacity = (_18 = props.opacity) !== null && _18 !== void 0 ? _18 : BarDefaults.opacity;
262
+ var isThreeD = (_19 = props.isThreeD) !== null && _19 !== void 0 ? _19 : BarDefaults.isThreeD;
263
+ var showXAxisIndices = (_20 = props.showXAxisIndices) !== null && _20 !== void 0 ? _20 : AxesAndRulesDefaults.showXAxisIndices;
264
+ var xAxisIndicesHeight = (_21 = props.xAxisIndicesHeight) !== null && _21 !== void 0 ? _21 : AxesAndRulesDefaults.xAxisIndicesHeight;
265
+ var xAxisIndicesWidth = (_22 = props.xAxisIndicesWidth) !== null && _22 !== void 0 ? _22 : AxesAndRulesDefaults.xAxisIndicesWidth;
266
+ var xAxisIndicesColor = (_23 = props.xAxisIndicesColor) !== null && _23 !== void 0 ? _23 : AxesAndRulesDefaults.xAxisIndicesColor;
267
+ var xAxisThickness = (_24 = props.xAxisThickness) !== null && _24 !== void 0 ? _24 : AxesAndRulesDefaults.xAxisThickness;
268
+ var xAxisTextNumberOfLines = (_25 = props.xAxisTextNumberOfLines) !== null && _25 !== void 0 ? _25 : AxesAndRulesDefaults.xAxisTextNumberOfLines;
269
+ var xAxisLabelsVerticalShift = (_26 = props.xAxisLabelsVerticalShift) !== null && _26 !== void 0 ? _26 : AxesAndRulesDefaults.xAxisLabelsVerticalShift;
270
+ var xAxisLabelsAtBottom = (_27 = props.xAxisLabelsAtBottom) !== null && _27 !== void 0 ? _27 : false;
270
271
  var horizontalRulesStyle = props.horizontalRulesStyle;
271
- var autoShiftLabels = (_27 = props.autoShiftLabels) !== null && _27 !== void 0 ? _27 : false;
272
- var barBorderColor = (_28 = props.barBorderColor) !== null && _28 !== void 0 ? _28 : BarDefaults.barBorderColor;
272
+ var autoShiftLabels = (_28 = props.autoShiftLabels) !== null && _28 !== void 0 ? _28 : false;
273
+ var barBorderColor = (_29 = props.barBorderColor) !== null && _29 !== void 0 ? _29 : BarDefaults.barBorderColor;
273
274
  var extendedContainerHeight = getExtendedContainerHeightWithPadding(containerHeight, 0);
274
275
  var axesAndRulesProps = getAxesAndRulesProps(props, containerHeight, stepHeight, stepValue, noOfSections, roundToDigits, negativeStepValue !== null && negativeStepValue !== void 0 ? negativeStepValue : stepValue, secondaryMaxValue, secondaryMinItem, showSecondaryFractionalValues, secondaryRoundToDigits);
275
- var _74 = axesAndRulesProps.secondaryYAxisConfig, secondaryStepHeight = _74.stepHeight, secondaryStepValue = _74.stepValue, secondaryNegativeStepHeight = _74.negativeStepHeight, secondaryNegativeStepValue = _74.negativeStepValue, secondaryNoOfSectionsBelowXAxis = _74.noOfSectionsBelowXAxis;
276
- var primary4thQuadrantHeight = noOfSectionsBelowXAxis * ((_29 = props.negativeStepHeight) !== null && _29 !== void 0 ? _29 : stepHeight);
276
+ var _75 = axesAndRulesProps.secondaryYAxisConfig, secondaryStepHeight = _75.stepHeight, secondaryStepValue = _75.stepValue, secondaryNegativeStepHeight = _75.negativeStepHeight, secondaryNegativeStepValue = _75.negativeStepValue, secondaryNoOfSectionsBelowXAxis = _75.noOfSectionsBelowXAxis;
277
+ var primary4thQuadrantHeight = noOfSectionsBelowXAxis * ((_30 = props.negativeStepHeight) !== null && _30 !== void 0 ? _30 : stepHeight);
277
278
  var secondary4thQuadrantHeight = secondaryNoOfSectionsBelowXAxis * secondaryNegativeStepHeight;
278
279
  var fourthQuadrantHeight = Math.max(primary4thQuadrantHeight, secondary4thQuadrantHeight);
279
280
  var containerHeightIncludingBelowXAxis = extendedContainerHeight + fourthQuadrantHeight;
280
- var _75 = __read(useState(-1), 2), pointerIndex = _75[0], setPointerIndex = _75[1];
281
- var _76 = __read(useState(0), 2), pointerX = _76[0], setPointerX = _76[1];
282
- var _77 = __read(useState(0), 2), pointerY = _77[0], setPointerY = _77[1];
283
- var _78 = __read(useState(), 2), pointerItem = _78[0], setPointerItem = _78[1];
284
- var _79 = __read(useState(0), 2), responderStartTime = _79[0], setResponderStartTime = _79[1];
285
- var _80 = __read(useState(false), 2), responderActive = _80[0], setResponderActive = _80[1];
281
+ var _76 = __read(useState(-1), 2), pointerIndex = _76[0], setPointerIndex = _76[1];
282
+ var _77 = __read(useState(0), 2), pointerX = _77[0], setPointerX = _77[1];
283
+ var _78 = __read(useState(0), 2), pointerY = _78[0], setPointerY = _78[1];
284
+ var _79 = __read(useState(), 2), pointerItem = _79[0], setPointerItem = _79[1];
285
+ var _80 = __read(useState(0), 2), responderStartTime = _80[0], setResponderStartTime = _80[1];
286
+ var _81 = __read(useState(false), 2), responderActive = _81[0], setResponderActive = _81[1];
286
287
  var pointerConfig = props.pointerConfig;
287
- var getPointerProps = (_30 = props.getPointerProps) !== null && _30 !== void 0 ? _30 : null;
288
- var pointerHeight = (_31 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.height) !== null && _31 !== void 0 ? _31 : defaultPointerConfig.height;
289
- var pointerWidth = (_32 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.width) !== null && _32 !== void 0 ? _32 : defaultPointerConfig.width;
290
- var pointerRadius = (_33 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.radius) !== null && _33 !== void 0 ? _33 : defaultPointerConfig.radius;
291
- var pointerColor = (_34 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColor) !== null && _34 !== void 0 ? _34 : defaultPointerConfig.pointerColor;
292
- var pointerComponent = (_35 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerComponent) !== null && _35 !== void 0 ? _35 : defaultPointerConfig.pointerComponent;
288
+ var getPointerProps = (_31 = props.getPointerProps) !== null && _31 !== void 0 ? _31 : null;
289
+ var pointerHeight = (_32 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.height) !== null && _32 !== void 0 ? _32 : defaultPointerConfig.height;
290
+ var pointerWidth = (_33 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.width) !== null && _33 !== void 0 ? _33 : defaultPointerConfig.width;
291
+ var pointerRadius = (_34 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.radius) !== null && _34 !== void 0 ? _34 : defaultPointerConfig.radius;
292
+ var pointerColor = (_35 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColor) !== null && _35 !== void 0 ? _35 : defaultPointerConfig.pointerColor;
293
+ var pointerComponent = (_36 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerComponent) !== null && _36 !== void 0 ? _36 : defaultPointerConfig.pointerComponent;
293
294
  var showPointerStrip = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.showPointerStrip) === false
294
295
  ? false
295
296
  : defaultPointerConfig.showPointerStrip;
296
- var pointerStripHeight = (_36 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripHeight) !== null && _36 !== void 0 ? _36 : defaultPointerConfig.pointerStripHeight;
297
- var pointerStripWidth = (_37 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripWidth) !== null && _37 !== void 0 ? _37 : defaultPointerConfig.pointerStripWidth;
298
- var pointerStripColor = (_38 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripColor) !== null && _38 !== void 0 ? _38 : defaultPointerConfig.pointerStripColor;
299
- var pointerStripUptoDataPoint = (_39 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripUptoDataPoint) !== null && _39 !== void 0 ? _39 : defaultPointerConfig.pointerStripUptoDataPoint;
300
- var pointerLabelComponent = (_40 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelComponent) !== null && _40 !== void 0 ? _40 : defaultPointerConfig.pointerLabelComponent;
301
- var stripOverPointer = (_41 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripOverPointer) !== null && _41 !== void 0 ? _41 : defaultPointerConfig.stripOverPointer;
302
- var shiftPointerLabelX = (_42 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelX) !== null && _42 !== void 0 ? _42 : defaultPointerConfig.shiftPointerLabelX;
303
- var shiftPointerLabelY = (_43 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelY) !== null && _43 !== void 0 ? _43 : defaultPointerConfig.shiftPointerLabelY;
304
- var pointerLabelWidth = (_44 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelWidth) !== null && _44 !== void 0 ? _44 : defaultPointerConfig.pointerLabelWidth;
305
- var pointerLabelHeight = (_45 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelHeight) !== null && _45 !== void 0 ? _45 : defaultPointerConfig.pointerLabelHeight;
306
- var autoAdjustPointerLabelPosition = (_46 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.autoAdjustPointerLabelPosition) !== null && _46 !== void 0 ? _46 : defaultPointerConfig.autoAdjustPointerLabelPosition;
307
- var pointerVanishDelay = (_47 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerVanishDelay) !== null && _47 !== void 0 ? _47 : defaultPointerConfig.pointerVanishDelay;
308
- var activatePointersOnLongPress = (_48 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersOnLongPress) !== null && _48 !== void 0 ? _48 : defaultPointerConfig.activatePointersOnLongPress;
309
- var activatePointersDelay = (_49 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersDelay) !== null && _49 !== void 0 ? _49 : defaultPointerConfig.activatePointersDelay;
310
- var initialPointerIndex = (_50 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerIndex) !== null && _50 !== void 0 ? _50 : defaultPointerConfig.initialPointerIndex;
311
- var initialPointerAppearDelay = (_51 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerAppearDelay) !== null && _51 !== void 0 ? _51 : (isAnimated
297
+ var pointerStripHeight = (_37 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripHeight) !== null && _37 !== void 0 ? _37 : defaultPointerConfig.pointerStripHeight;
298
+ var pointerStripWidth = (_38 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripWidth) !== null && _38 !== void 0 ? _38 : defaultPointerConfig.pointerStripWidth;
299
+ var pointerStripColor = (_39 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripColor) !== null && _39 !== void 0 ? _39 : defaultPointerConfig.pointerStripColor;
300
+ var pointerStripUptoDataPoint = (_40 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerStripUptoDataPoint) !== null && _40 !== void 0 ? _40 : defaultPointerConfig.pointerStripUptoDataPoint;
301
+ var pointerLabelComponent = (_41 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelComponent) !== null && _41 !== void 0 ? _41 : defaultPointerConfig.pointerLabelComponent;
302
+ var stripOverPointer = (_42 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripOverPointer) !== null && _42 !== void 0 ? _42 : defaultPointerConfig.stripOverPointer;
303
+ var shiftPointerLabelX = (_43 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelX) !== null && _43 !== void 0 ? _43 : defaultPointerConfig.shiftPointerLabelX;
304
+ var shiftPointerLabelY = (_44 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.shiftPointerLabelY) !== null && _44 !== void 0 ? _44 : defaultPointerConfig.shiftPointerLabelY;
305
+ var pointerLabelWidth = (_45 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelWidth) !== null && _45 !== void 0 ? _45 : defaultPointerConfig.pointerLabelWidth;
306
+ var pointerLabelHeight = (_46 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerLabelHeight) !== null && _46 !== void 0 ? _46 : defaultPointerConfig.pointerLabelHeight;
307
+ var autoAdjustPointerLabelPosition = (_47 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.autoAdjustPointerLabelPosition) !== null && _47 !== void 0 ? _47 : defaultPointerConfig.autoAdjustPointerLabelPosition;
308
+ var pointerVanishDelay = (_48 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerVanishDelay) !== null && _48 !== void 0 ? _48 : defaultPointerConfig.pointerVanishDelay;
309
+ var activatePointersOnLongPress = (_49 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersOnLongPress) !== null && _49 !== void 0 ? _49 : defaultPointerConfig.activatePointersOnLongPress;
310
+ var activatePointersDelay = (_50 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.activatePointersDelay) !== null && _50 !== void 0 ? _50 : defaultPointerConfig.activatePointersDelay;
311
+ var initialPointerIndex = (_51 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerIndex) !== null && _51 !== void 0 ? _51 : defaultPointerConfig.initialPointerIndex;
312
+ var initialPointerAppearDelay = (_52 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.initialPointerAppearDelay) !== null && _52 !== void 0 ? _52 : (isAnimated
312
313
  ? animationDuration
313
314
  : defaultPointerConfig.initialPointerAppearDelay);
314
- var persistPointer = (_52 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.persistPointer) !== null && _52 !== void 0 ? _52 : defaultPointerConfig.persistPointer;
315
- var hidePointer1 = (_53 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer1) !== null && _53 !== void 0 ? _53 : defaultPointerConfig.hidePointer1;
315
+ var persistPointer = (_53 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.persistPointer) !== null && _53 !== void 0 ? _53 : defaultPointerConfig.persistPointer;
316
+ var hidePointer1 = (_54 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.hidePointer1) !== null && _54 !== void 0 ? _54 : defaultPointerConfig.hidePointer1;
316
317
  var pointerEvents = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerEvents;
317
- var stripBehindBars = (_54 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripBehindBars) !== null && _54 !== void 0 ? _54 : defaultPointerConfig.stripBehindBars;
318
- var disableScroll = (_55 = props.disableScroll) !== null && _55 !== void 0 ? _55 : (pointerConfig
318
+ var stripBehindBars = (_55 = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.stripBehindBars) !== null && _55 !== void 0 ? _55 : defaultPointerConfig.stripBehindBars;
319
+ var disableScroll = (_56 = props.disableScroll) !== null && _56 !== void 0 ? _56 : (pointerConfig
319
320
  ? activatePointersOnLongPress
320
321
  ? !!responderActive
321
322
  : true
322
323
  : false);
323
324
  var yAxisExtraHeightAtTop = props.trimYAxisAtTop
324
325
  ? 0
325
- : (_56 = props.yAxisExtraHeight) !== null && _56 !== void 0 ? _56 : containerHeight / 20;
326
+ : (_57 = props.yAxisExtraHeight) !== null && _57 !== void 0 ? _57 : containerHeight / 20;
326
327
  var barInnerComponent = props.barInnerComponent;
327
328
  var localYAxisOffset1 = lineConfig.isSecondary
328
- ? (_58 = (_57 = props.secondaryYAxis) === null || _57 === void 0 ? void 0 : _57.yAxisOffset) !== null && _58 !== void 0 ? _58 : 0
329
+ ? (_59 = (_58 = props.secondaryYAxis) === null || _58 === void 0 ? void 0 : _58.yAxisOffset) !== null && _59 !== void 0 ? _59 : 0
329
330
  : yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0;
330
331
  var localYAxisOffset2 = lineConfig2.isSecondary
331
- ? (_60 = (_59 = props.secondaryYAxis) === null || _59 === void 0 ? void 0 : _59.yAxisOffset) !== null && _60 !== void 0 ? _60 : 0
332
+ ? (_61 = (_60 = props.secondaryYAxis) === null || _60 === void 0 ? void 0 : _60.yAxisOffset) !== null && _61 !== void 0 ? _61 : 0
332
333
  : yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0;
333
334
  useEffect(function () {
334
335
  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;
@@ -444,9 +445,9 @@ export var useBarChart = function (props) {
444
445
  spacing,
445
446
  yAxisLabelWidth,
446
447
  lineConfig.showArrow,
447
- (_61 = lineConfig.arrowConfig) === null || _61 === void 0 ? void 0 : _61.length,
448
- (_62 = lineConfig.arrowConfig) === null || _62 === void 0 ? void 0 : _62.width,
449
- (_63 = lineConfig.arrowConfig) === null || _63 === void 0 ? void 0 : _63.showArrowBase
448
+ (_62 = lineConfig.arrowConfig) === null || _62 === void 0 ? void 0 : _62.length,
449
+ (_63 = lineConfig.arrowConfig) === null || _63 === void 0 ? void 0 : _63.width,
450
+ (_64 = lineConfig.arrowConfig) === null || _64 === void 0 ? void 0 : _64.showArrowBase
450
451
  ]);
451
452
  useEffect(function () {
452
453
  var _a, _b;
@@ -583,19 +584,19 @@ export var useBarChart = function (props) {
583
584
  containerHeight: containerHeight,
584
585
  noOfSectionsBelowXAxis: noOfSectionsBelowXAxis,
585
586
  stepHeight: stepHeight,
586
- negativeStepHeight: (_64 = props.negativeStepHeight) !== null && _64 !== void 0 ? _64 : stepHeight,
587
+ negativeStepHeight: (_65 = props.negativeStepHeight) !== null && _65 !== void 0 ? _65 : stepHeight,
587
588
  labelsExtraHeight: labelsExtraHeight,
588
589
  yAxisLabelWidth: yAxisLabelWidth,
589
590
  horizontal: horizontal,
590
591
  rtl: rtl,
591
- shiftX: (_65 = props.shiftX) !== null && _65 !== void 0 ? _65 : 0,
592
- shiftY: (_66 = props.shiftY) !== null && _66 !== void 0 ? _66 : 0,
592
+ shiftX: (_66 = props.shiftX) !== null && _66 !== void 0 ? _66 : 0,
593
+ shiftY: (_67 = props.shiftY) !== null && _67 !== void 0 ? _67 : 0,
593
594
  yAxisAtTop: yAxisAtTop,
594
595
  initialSpacing: initialSpacing,
595
596
  data: data,
596
597
  stackData: stackData,
597
598
  // secondaryData,
598
- barWidth: (_67 = props.barWidth) !== null && _67 !== void 0 ? _67 : defaultBarWidth,
599
+ barWidth: (_68 = props.barWidth) !== null && _68 !== void 0 ? _68 : defaultBarWidth,
599
600
  xAxisThickness: xAxisThickness,
600
601
  totalWidth: totalWidth,
601
602
  disableScroll: disableScroll,
@@ -644,13 +645,15 @@ export var useBarChart = function (props) {
644
645
  pointerY: pointerY,
645
646
  onEndReached: props.onEndReached,
646
647
  onStartReached: props.onStartReached,
647
- endReachedOffset: (_68 = props.endReachedOffset) !== null && _68 !== void 0 ? _68 : BarDefaults.endReachedOffset,
648
+ endReachedOffset: (_69 = props.endReachedOffset) !== null && _69 !== void 0 ? _69 : BarDefaults.endReachedOffset,
648
649
  onMomentumScrollEnd: props.onMomentumScrollEnd,
649
650
  customBackground: props.customBackground,
650
651
  highlightEnabled: highlightEnabled,
651
652
  lowlightOpacity: lowlightOpacity,
652
653
  xAxisLabelsAtBottom: xAxisLabelsAtBottom,
653
- onScrollEndDrag: props.onScrollEndDrag
654
+ onScrollEndDrag: props.onScrollEndDrag,
655
+ floatingYAxisLabels: floatingYAxisLabels,
656
+ allowFontScaling: allowFontScaling
654
657
  };
655
658
  return {
656
659
  lineConfig: lineConfig,
@@ -763,6 +766,7 @@ export var useBarChart = function (props) {
763
766
  barAndLineChartsWrapperProps: barAndLineChartsWrapperProps,
764
767
  yAxisExtraHeightAtTop: yAxisExtraHeightAtTop,
765
768
  selectedStackIndex: selectedStackIndex,
766
- setSelectedStackIndex: setSelectedStackIndex
769
+ setSelectedStackIndex: setSelectedStackIndex,
770
+ allowFontScaling: allowFontScaling
767
771
  };
768
772
  };
@@ -195,6 +195,8 @@ export interface BarChartPropsType {
195
195
  xAxisLabelsVerticalShift?: number;
196
196
  xAxisLabelsAtBottom?: boolean;
197
197
  yAxisLabelWidth?: number;
198
+ floatingYAxisLabels?: boolean;
199
+ allowFontScaling?: boolean;
198
200
  hideYAxisText?: boolean;
199
201
  rotateYAxisTexts?: number;
200
202
  yAxisSide?: yAxisSides;
@@ -663,6 +665,7 @@ export interface animatedBarPropTypes {
663
665
  selectedIndex: number[];
664
666
  focusBarOnPress?: boolean;
665
667
  focusedBarConfig?: FocusedBarConfig;
668
+ containerHeight: number;
666
669
  }
667
670
  export interface CommonPropsFor2dand3dBarsType {
668
671
  barBackgroundPattern?: () => ReactNode;
@@ -97,5 +97,6 @@ export declare const useLineChartBiColor: (props: extendedLineChartBicolorPropsT
97
97
  }[];
98
98
  barAndLineChartsWrapperProps: BarAndLineChartsWrapperTypes;
99
99
  yAxisExtraHeightAtTop: number;
100
+ allowFontScaling: boolean;
100
101
  };
101
102
  export {};
@@ -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
  };
@@ -36,7 +36,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
36
36
  };
37
37
  import { useEffect, useMemo, useState } from 'react';
38
38
  import { AxesAndRulesDefaults, LineDefaults, SEGMENT_END, SEGMENT_START, chartTypes, defaultArrowConfig, defaultPointerConfig } from '../utils/constants';
39
- import { computeMaxAndMinItems, getAllArrowProperties, getArrowPoints, getAxesAndRulesProps, getCurvePathWithSegments, getExtendedContainerHeightWithPadding, getLineSegmentsDueToNoExtrapolation, getLineSegmentsForMissingValues, getMaxValue, getNoOfSections, getPathWithHighlight, getSanitisedData, getSecondaryDataWithOffsetIncluded, getSegmentString, indexOfFirstNonZeroDigit, svgPath } from '../utils';
39
+ import { colorsToLowerCase, computeMaxAndMinItems, getAllArrowProperties, getArrowPoints, getAxesAndRulesProps, getCurvePathWithSegments, getExtendedContainerHeightWithPadding, getLineSegmentsDueToNoExtrapolation, getLineSegmentsForMissingValues, getMaxValue, getNoOfSections, getPathWithHighlight, getSanitisedData, getSecondaryDataWithOffsetIncluded, getSegmentString, indexOfFirstNonZeroDigit, svgPath } from '../utils';
40
40
  import { EdgePosition } from '../utils/types';
41
41
  export var useLineChart = function (props) {
42
42
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, _231, _232, _233, _234, _235, _236, _237, _238, _239, _240, _241, _242, _243, _244, _245, _246, _247, _248, _249, _250, _251, _252, _253, _254, _255, _256, _257, _258, _259, _260, _261, _262, _263, _264, _265, _266, _267, _268, _269, _270, _271, _272, _273, _274, _275, _276, _277, _278, _279, _280, _281, _282, _283, _284, _285, _286, _287, _288, _289, _290, _291, _292, _293, _294, _295, _296, _297, _298, _299, _300, _301, _302, _303, _304, _305, _306, _307, _308, _309, _310, _311, _312, _313, _314, _315, _316, _317, _318, _319, _320, _321, _322, _323, _324, _325, _326, _327, _328, _329, _330, _331, _332, _333, _334, _335, _336, _337, _338;
@@ -105,12 +105,13 @@ export var useLineChart = function (props) {
105
105
  var _386 = __read(useState([]), 2), fillPointsFromSet = _386[0], setFillPointsFromSet = _386[1];
106
106
  var _387 = __read(useState([]), 2), arrowPointsFromSet = _387[0], setArrowPointsFromSet = _387[1];
107
107
  var _388 = __read(useState((_o = props.focusedDataPointIndex) !== null && _o !== void 0 ? _o : -1), 2), selectedIndex = _388[0], setSelectedIndex = _388[1];
108
+ var allowFontScaling = (_p = props.allowFontScaling) !== null && _p !== void 0 ? _p : AxesAndRulesDefaults.allowFontScaling;
108
109
  useEffect(function () {
109
110
  var _a;
110
111
  setSelectedIndex((_a = props.focusedDataPointIndex) !== null && _a !== void 0 ? _a : -1);
111
112
  }, [props.focusedDataPointIndex]);
112
113
  var noOfSections = getNoOfSections(props.noOfSections, props.maxValue, props.stepValue);
113
- var containerHeight = (_p = props.height) !== null && _p !== void 0 ? _p : (((_q = props.stepHeight) !== null && _q !== void 0 ? _q : 0) * noOfSections ||
114
+ var containerHeight = (_q = props.height) !== null && _q !== void 0 ? _q : (((_r = props.stepHeight) !== null && _r !== void 0 ? _r : 0) * noOfSections ||
114
115
  AxesAndRulesDefaults.containerHeight);
115
116
  var dataSanitisationProps = {
116
117
  showDataPointsForMissingValues: showDataPointsForMissingValues,
@@ -123,17 +124,16 @@ export var useLineChart = function (props) {
123
124
  var data3 = useMemo(function () { return getSanitisedData(props.data3, dataSanitisationProps); }, [yAxisOffset, props.data3]);
124
125
  var data4 = useMemo(function () { return getSanitisedData(props.data4, dataSanitisationProps); }, [yAxisOffset, props.data4]);
125
126
  var data5 = useMemo(function () { return getSanitisedData(props.data5, dataSanitisationProps); }, [yAxisOffset, props.data5]);
126
- var secondaryData = (_r = getSecondaryDataWithOffsetIncluded(props.secondaryData, props.secondaryYAxis, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive)) !== null && _r !== void 0 ? _r : [];
127
- var dataSet = undefined;
128
- if ((_s = props.dataSet) === null || _s === void 0 ? void 0 : _s.length) {
129
- dataSet = useMemo(function () {
130
- var _a;
131
- return (_a = props.dataSet) === null || _a === void 0 ? void 0 : _a.map(function (dataSetItem) {
132
- var sanitisedData = getSanitisedData(dataSetItem.data, dataSanitisationProps);
133
- return __assign(__assign({}, dataSetItem), { data: sanitisedData });
134
- });
135
- }, [yAxisOffset, props.dataSet]);
136
- }
127
+ var secondaryData = (_s = getSecondaryDataWithOffsetIncluded(props.secondaryData, props.secondaryYAxis, showDataPointsForMissingValues, interpolateMissingValues, onlyPositive)) !== null && _s !== void 0 ? _s : [];
128
+ var dataSet = useMemo(function () {
129
+ var _a, _b;
130
+ if (!((_a = props.dataSet) === null || _a === void 0 ? void 0 : _a.length))
131
+ return undefined;
132
+ return (_b = props.dataSet) === null || _b === void 0 ? void 0 : _b.map(function (dataSetItem) {
133
+ var sanitisedData = getSanitisedData(dataSetItem.data, dataSanitisationProps);
134
+ return __assign(__assign({}, dataSetItem), { data: sanitisedData });
135
+ });
136
+ }, [yAxisOffset, props.dataSet]);
137
137
  var data0 = (_t = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) === null || _t === void 0 ? void 0 : _t.data;
138
138
  var scrollToEnd = (_u = props.scrollToEnd) !== null && _u !== void 0 ? _u : LineDefaults.scrollToEnd;
139
139
  var scrollAnimation = (_v = props.scrollAnimation) !== null && _v !== void 0 ? _v : LineDefaults.scrollAnimation;
@@ -170,27 +170,27 @@ export var useLineChart = function (props) {
170
170
  ? getLineSegmentsForMissingValues(props.data)
171
171
  : !extrapolateMissingValues
172
172
  ? getLineSegmentsDueToNoExtrapolation(props.data)
173
- : props.lineSegments;
173
+ : colorsToLowerCase(props.lineSegments);
174
174
  var lineSegments2 = !interpolateMissingValues
175
175
  ? getLineSegmentsForMissingValues(props.data2)
176
176
  : !extrapolateMissingValues
177
177
  ? getLineSegmentsDueToNoExtrapolation(props.data2)
178
- : props.lineSegments2;
178
+ : colorsToLowerCase(props.lineSegments2);
179
179
  var lineSegments3 = !interpolateMissingValues
180
180
  ? getLineSegmentsForMissingValues(props.data3)
181
181
  : !extrapolateMissingValues
182
182
  ? getLineSegmentsDueToNoExtrapolation(props.data3)
183
- : props.lineSegments3;
183
+ : colorsToLowerCase(props.lineSegments3);
184
184
  var lineSegments4 = !interpolateMissingValues
185
185
  ? getLineSegmentsForMissingValues(props.data4)
186
186
  : !extrapolateMissingValues
187
187
  ? getLineSegmentsDueToNoExtrapolation(props.data4)
188
- : props.lineSegments4;
188
+ : colorsToLowerCase(props.lineSegments4);
189
189
  var lineSegments5 = !interpolateMissingValues
190
190
  ? getLineSegmentsForMissingValues(props.data5)
191
191
  : !extrapolateMissingValues
192
192
  ? getLineSegmentsDueToNoExtrapolation(props.data5)
193
- : props.lineSegments5;
193
+ : colorsToLowerCase(props.lineSegments5);
194
194
  var highlightedRange = props.highlightedRange;
195
195
  var adjustToWidth = (_13 = props.adjustToWidth) !== null && _13 !== void 0 ? _13 : false;
196
196
  var initialSpacing = (_14 = props.initialSpacing) !== null && _14 !== void 0 ? _14 : LineDefaults.initialSpacing;
@@ -551,7 +551,7 @@ export var useLineChart = function (props) {
551
551
  heightUptoXaxis +
552
552
  ' ');
553
553
  };
554
- var getNextPoint = function (data, index, around, before, spacingArray) {
554
+ var getNextPoint = function (data, index, around, before, spacingArray, isSecondary) {
555
555
  var isLast = index === data.length - 1;
556
556
  return isLast && !(around || before)
557
557
  ? ' '
@@ -559,10 +559,12 @@ export var useLineChart = function (props) {
559
559
  (getX(spacingArray, index) +
560
560
  (around ? (isLast ? 0 : spacing / 2) : before ? 0 : spacing)) +
561
561
  ' ' +
562
- getY(data[index].value) +
562
+ (isSecondary
563
+ ? getSecondaryY(data[index].value)
564
+ : getY(data[index].value)) +
563
565
  ' ';
564
566
  };
565
- var getStepPath = function (data, i, spacingArray, lineSegment) {
567
+ var getStepPath = function (data, i, spacingArray, lineSegment, isSecondary) {
566
568
  var around = edgePosition === EdgePosition.AROUND_DATA_POINT;
567
569
  var before = edgePosition === EdgePosition.BEFORE_DATA_POINT;
568
570
  var isSegment = lineSegment === null || lineSegment === void 0 ? void 0 : lineSegment.find(function (segment) { return segment.startIndex === i; });
@@ -570,11 +572,11 @@ export var useLineChart = function (props) {
570
572
  (getX(spacingArray, i) -
571
573
  (around && i > 0 ? spacing / 2 : before && i > 0 ? spacing : 0)) +
572
574
  ' ' +
573
- getY(data[i].value) +
575
+ (isSecondary ? getSecondaryY(data[i].value) : getY(data[i].value)) + // handle isSecondary for dataSet
574
576
  (isSegment
575
577
  ? getSegmentString(lineSegment, i, SEGMENT_START, SEGMENT_END, true)
576
578
  : '') +
577
- getNextPoint(data, i, around, before, spacingArray));
579
+ getNextPoint(data, i, around, before, spacingArray, isSecondary));
578
580
  };
579
581
  var getSegmentPath = function (data, i, lineSegment, startIndex, endIndex, spacingArray, isSecondary) {
580
582
  var path = 'L' +
@@ -639,7 +641,7 @@ export var useLineChart = function (props) {
639
641
  if (i >= ((_k = set.startIndex) !== null && _k !== void 0 ? _k : 0) &&
640
642
  i <= ((_l = set.endIndex) !== null && _l !== void 0 ? _l : set.data.length - 1)) {
641
643
  if ((_m = set.stepChart) !== null && _m !== void 0 ? _m : stepChart) {
642
- pp += getStepPath(set.data, i, cumulativeSpacingForSet[index], setSegments);
644
+ pp += getStepPath(set.data, i, cumulativeSpacingForSet[index], setSegments, set.isSecondary);
643
645
  }
644
646
  else {
645
647
  pp += getSegmentPath(set.data, i, setSegments, //set.lineSegments,
@@ -1396,7 +1398,8 @@ export var useLineChart = function (props) {
1396
1398
  highlightEnabled: LineDefaults.highlightEnabled,
1397
1399
  lowlightOpacity: LineDefaults.lowlightOpacity,
1398
1400
  xAxisLabelsAtBottom: xAxisLabelsAtBottom,
1399
- onScrollEndDrag: props.onScrollEndDrag
1401
+ onScrollEndDrag: props.onScrollEndDrag,
1402
+ allowFontScaling: allowFontScaling
1400
1403
  };
1401
1404
  var pointerItemLocal = [];
1402
1405
  if (pointerConfig) {
@@ -1801,7 +1804,8 @@ export var useLineChart = function (props) {
1801
1804
  renderTooltip4: renderTooltip4,
1802
1805
  renderTooltip5: renderTooltip5,
1803
1806
  renderTooltipSecondary: renderTooltipSecondary,
1804
- pointerItemLocal: pointerItemLocal
1807
+ pointerItemLocal: pointerItemLocal,
1808
+ allowFontScaling: allowFontScaling
1805
1809
  // oldPoints
1806
1810
  };
1807
1811
  };
@@ -167,6 +167,8 @@ export interface LineChartPropsType {
167
167
  roundToDigits?: number;
168
168
  yAxisLabelWidth?: number;
169
169
  hideYAxisText?: boolean;
170
+ floatingYAxisLabels?: boolean;
171
+ allowFontScaling?: boolean;
170
172
  backgroundColor?: ColorValue;
171
173
  customBackground?: CustomBackground;
172
174
  curved?: boolean;
@@ -595,6 +597,8 @@ export interface LineChartBicolorPropsType {
595
597
  parentWidth?: number;
596
598
  yAxisExtraHeight?: number;
597
599
  trimYAxisAtTop?: boolean;
600
+ floatingYAxisLabels?: boolean;
601
+ allowFontScaling?: boolean;
598
602
  }
599
603
  export interface LineChartPropsTypeForWeb extends LineChartPropsType {
600
604
  onContextMenu?: Function;
@@ -60,7 +60,7 @@ export var usePopulationPyramid = function (props) {
60
60
  : height;
61
61
  var stepHeight = (_s = props.stepHeight) !== null && _s !== void 0 ? _s : containerHeight / noOfSections;
62
62
  var xAxisLabelsHeight = 30;
63
- var containerHeightWithXaxisLabels = containerHeight + xAxisLabelsHeight;
63
+ var containerHeightWithXaxisLabels = containerHeight + xAxisLabelsHeight + Math.max(0, xAxisLabelShiftY);
64
64
  var mid = (width + yAxisLabelWidth) / 2;
65
65
  var leftMax = Math.max.apply(Math, __spreadArray([], __read(data.map(function (item) { return item.left; })), false));
66
66
  var rightMax = Math.max.apply(Math, __spreadArray([], __read(data.map(function (item) { return item.right; })), false));
@@ -89,4 +89,5 @@ export declare const useRadarChart: (props: RadarChartProps) => {
89
89
  r: number;
90
90
  };
91
91
  animateTogether: boolean;
92
+ startAngle: number;
92
93
  };
@@ -37,7 +37,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
37
37
  import { radarChartDefaults } from '../utils/constants';
38
38
  export var useRadarChart = function (props) {
39
39
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
40
- var _u = props.circular, circular = _u === void 0 ? false : _u, _v = props.gridConfig, gridConfig = _v === void 0 ? {} : _v, _w = props.polygonConfig, polygonConfig = _w === void 0 ? {} : _w, _x = props.data, data = _x === void 0 ? [] : _x, dataSet = props.dataSet, _y = props.noOfSections, noOfSections = _y === void 0 ? radarChartDefaults.noOfSections : _y, _z = props.chartSize, chartSize = _z === void 0 ? radarChartDefaults.chartSize : _z, _0 = props.labelConfig, labelConfig = _0 === void 0 ? {} : _0, labelConfigArray = props.labelConfigArray, _1 = props.asterLinesConfig, asterLinesConfig = _1 === void 0 ? {} : _1, _2 = props.hideGrid, hideGrid = _2 === void 0 ? radarChartDefaults.hideGrid : _2, _3 = props.hideLabels, hideLabels = _3 === void 0 ? radarChartDefaults.hideLabels : _3, _4 = props.hideAsterLines, hideAsterLines = _4 === void 0 ? (_a = props.hideGrid) !== null && _a !== void 0 ? _a : radarChartDefaults.hideAsterLines : _4, _5 = props.dataLabelsConfig, dataLabelsConfig = _5 === void 0 ? {} : _5, _6 = props.labelsPositionOffset, labelsPositionOffset = _6 === void 0 ? radarChartDefaults.labelsPositionOffset : _6, _7 = props.dataLabelsPositionOffset, dataLabelsPositionOffset = _7 === void 0 ? radarChartDefaults.dataLabelsPositionOffset : _7, _8 = props.isAnimated, isAnimated = _8 === void 0 ? radarChartDefaults.isAnimated : _8, _9 = props.animationDuration, animationDuration = _9 === void 0 ? radarChartDefaults.animationDuration : _9, _10 = props.animateTogether, animateTogether = _10 === void 0 ? radarChartDefaults.animateTogether : _10;
40
+ var _u = props.circular, circular = _u === void 0 ? false : _u, _v = props.gridConfig, gridConfig = _v === void 0 ? {} : _v, _w = props.polygonConfig, polygonConfig = _w === void 0 ? {} : _w, _x = props.data, data = _x === void 0 ? [] : _x, dataSet = props.dataSet, _y = props.noOfSections, noOfSections = _y === void 0 ? radarChartDefaults.noOfSections : _y, _z = props.chartSize, chartSize = _z === void 0 ? radarChartDefaults.chartSize : _z, _0 = props.labelConfig, labelConfig = _0 === void 0 ? {} : _0, labelConfigArray = props.labelConfigArray, _1 = props.asterLinesConfig, asterLinesConfig = _1 === void 0 ? {} : _1, _2 = props.hideGrid, hideGrid = _2 === void 0 ? radarChartDefaults.hideGrid : _2, _3 = props.hideLabels, hideLabels = _3 === void 0 ? radarChartDefaults.hideLabels : _3, _4 = props.hideAsterLines, hideAsterLines = _4 === void 0 ? (_a = props.hideGrid) !== null && _a !== void 0 ? _a : radarChartDefaults.hideAsterLines : _4, _5 = props.dataLabelsConfig, dataLabelsConfig = _5 === void 0 ? {} : _5, _6 = props.labelsPositionOffset, labelsPositionOffset = _6 === void 0 ? radarChartDefaults.labelsPositionOffset : _6, _7 = props.dataLabelsPositionOffset, dataLabelsPositionOffset = _7 === void 0 ? radarChartDefaults.dataLabelsPositionOffset : _7, _8 = props.isAnimated, isAnimated = _8 === void 0 ? radarChartDefaults.isAnimated : _8, _9 = props.animationDuration, animationDuration = _9 === void 0 ? radarChartDefaults.animationDuration : _9, _10 = props.animateTogether, animateTogether = _10 === void 0 ? radarChartDefaults.animateTogether : _10, _11 = props.startAngle, startAngle = _11 === void 0 ? radarChartDefaults.startAngle : _11, _12 = props.isClockWise, isClockWise = _12 === void 0 ? radarChartDefaults.isClockWise : _12;
41
41
  var labels = (_e = (_b = props.labels) !== null && _b !== void 0 ? _b : (_d = ((_c = dataSet === null || dataSet === void 0 ? void 0 : dataSet[0]) !== null && _c !== void 0 ? _c : data)) === null || _d === void 0 ? void 0 : _d.map(function (_, index) { return "Label".concat(index + 1); })) !== null && _e !== void 0 ? _e : [];
42
42
  var getMax = function (dataSet) {
43
43
  return dataSet.reduce(function (acc, set) {
@@ -58,31 +58,31 @@ export var useRadarChart = function (props) {
58
58
  };
59
59
  var center = chartSize / 2;
60
60
  var radius = center * 0.8;
61
- var _11 = gridConfig.stroke, gridStroke = _11 === void 0 ? radarChartDefaults.gridSection.stroke : _11, _12 = gridConfig.strokeWidth, gridStrokeWidth = _12 === void 0 ? radarChartDefaults.gridSection.strokeWidth : _12, _13 = gridConfig.strokeDashArray, gridStrokeDashArray = _13 === void 0 ? radarChartDefaults.gridSection
62
- .strokeDashArray : _13, _14 = gridConfig.fill, gridFill = _14 === void 0 ? radarChartDefaults.gridSection.fill : _14, _15 = gridConfig.gradientColor, gridGradientColor = _15 === void 0 ? radarChartDefaults.gridSection
63
- .gradientColor : _15, _16 = gridConfig.showGradient, gridShowGradient = _16 === void 0 ? radarChartDefaults.gridSection
64
- .showGradient : _16, _17 = gridConfig.opacity, gridOpacity = _17 === void 0 ? radarChartDefaults.gridSection.opacity : _17, _18 = gridConfig.gradientOpacity, gridGradientOpacity = _18 === void 0 ? radarChartDefaults.gridSection
65
- .gradientOpacity : _18;
61
+ var _13 = gridConfig.stroke, gridStroke = _13 === void 0 ? radarChartDefaults.gridSection.stroke : _13, _14 = gridConfig.strokeWidth, gridStrokeWidth = _14 === void 0 ? radarChartDefaults.gridSection.strokeWidth : _14, _15 = gridConfig.strokeDashArray, gridStrokeDashArray = _15 === void 0 ? radarChartDefaults.gridSection
62
+ .strokeDashArray : _15, _16 = gridConfig.fill, gridFill = _16 === void 0 ? radarChartDefaults.gridSection.fill : _16, _17 = gridConfig.gradientColor, gridGradientColor = _17 === void 0 ? radarChartDefaults.gridSection
63
+ .gradientColor : _17, _18 = gridConfig.showGradient, gridShowGradient = _18 === void 0 ? radarChartDefaults.gridSection
64
+ .showGradient : _18, _19 = gridConfig.opacity, gridOpacity = _19 === void 0 ? radarChartDefaults.gridSection.opacity : _19, _20 = gridConfig.gradientOpacity, gridGradientOpacity = _20 === void 0 ? radarChartDefaults.gridSection
65
+ .gradientOpacity : _20;
66
66
  var gridSections = (_j = (_h = gridConfig.gridSections) === null || _h === void 0 ? void 0 : _h.map(function (i) { return (__assign(__assign({}, radarChartDefaults.gridSection), i)); })) !== null && _j !== void 0 ? _j : Array(noOfSections).fill({});
67
- var _19 = labelConfig.fontSize, fontSize = _19 === void 0 ? radarChartDefaults.labelConfig.fontSize : _19, _20 = labelConfig.stroke, stroke = _20 === void 0 ? radarChartDefaults.labelConfig.stroke : _20, _21 = labelConfig.textAnchor, textAnchor = _21 === void 0 ? radarChartDefaults.labelConfig.textAnchor : _21, _22 = labelConfig.alignmentBaseline, alignmentBaseline = _22 === void 0 ? radarChartDefaults.labelConfig.alignmentBaseline : _22, _23 = labelConfig.fontWeight, fontWeight = _23 === void 0 ? radarChartDefaults.labelConfig.fontWeight : _23, _24 = labelConfig.fontFamily, fontFamily = _24 === void 0 ? radarChartDefaults.labelConfig.fontFamily : _24;
68
- var _25 = dataLabelsConfig.fontSize, dataLabelsFontSize = _25 === void 0 ? fontSize : _25, // defaults to labelConfig (from above)
69
- _26 = dataLabelsConfig.stroke, // defaults to labelConfig (from above)
70
- dataLabelsColor = _26 === void 0 ? stroke : _26, // defaults to labelConfig (from above)
71
- _27 = dataLabelsConfig.textAnchor, // defaults to labelConfig (from above)
72
- dataLabelsTextAnchor = _27 === void 0 ? textAnchor : _27, // defaults to labelConfig (from above)
73
- _28 = dataLabelsConfig.alignmentBaseline, // defaults to labelConfig (from above)
74
- dataLabelsAlignmentBaseline = _28 === void 0 ? alignmentBaseline : _28, // defaults to labelConfig (from above)
75
- _29 = dataLabelsConfig.fontWeight, // defaults to labelConfig (from above)
76
- dataLabelsFontWeight = _29 === void 0 ? fontWeight : _29, // defaults to labelConfig (from above)
77
- _30 = dataLabelsConfig.fontFamily // defaults to labelConfig (from above)
67
+ var _21 = labelConfig.fontSize, fontSize = _21 === void 0 ? radarChartDefaults.labelConfig.fontSize : _21, _22 = labelConfig.stroke, stroke = _22 === void 0 ? radarChartDefaults.labelConfig.stroke : _22, _23 = labelConfig.textAnchor, textAnchor = _23 === void 0 ? radarChartDefaults.labelConfig.textAnchor : _23, _24 = labelConfig.alignmentBaseline, alignmentBaseline = _24 === void 0 ? radarChartDefaults.labelConfig.alignmentBaseline : _24, _25 = labelConfig.fontWeight, fontWeight = _25 === void 0 ? radarChartDefaults.labelConfig.fontWeight : _25, _26 = labelConfig.fontFamily, fontFamily = _26 === void 0 ? radarChartDefaults.labelConfig.fontFamily : _26;
68
+ var _27 = dataLabelsConfig.fontSize, dataLabelsFontSize = _27 === void 0 ? fontSize : _27, // defaults to labelConfig (from above)
69
+ _28 = dataLabelsConfig.stroke, // defaults to labelConfig (from above)
70
+ dataLabelsColor = _28 === void 0 ? stroke : _28, // defaults to labelConfig (from above)
71
+ _29 = dataLabelsConfig.textAnchor, // defaults to labelConfig (from above)
72
+ dataLabelsTextAnchor = _29 === void 0 ? textAnchor : _29, // defaults to labelConfig (from above)
73
+ _30 = dataLabelsConfig.alignmentBaseline, // defaults to labelConfig (from above)
74
+ dataLabelsAlignmentBaseline = _30 === void 0 ? alignmentBaseline : _30, // defaults to labelConfig (from above)
75
+ _31 = dataLabelsConfig.fontWeight, // defaults to labelConfig (from above)
76
+ dataLabelsFontWeight = _31 === void 0 ? fontWeight : _31, // defaults to labelConfig (from above)
77
+ _32 = dataLabelsConfig.fontFamily // defaults to labelConfig (from above)
78
78
  , // defaults to labelConfig (from above)
79
- dataLabelsFontFamily = _30 === void 0 ? fontFamily : _30 // defaults to labelConfig (from above)
79
+ dataLabelsFontFamily = _32 === void 0 ? fontFamily : _32 // defaults to labelConfig (from above)
80
80
  ;
81
- var _31 = polygonConfig.stroke, polygonStroke = _31 === void 0 ? radarChartDefaults.polygonConfig.stroke : _31, _32 = polygonConfig.strokeWidth, polygonStrokeWidth = _32 === void 0 ? radarChartDefaults.polygonConfig
82
- .strokeWidth : _32, _33 = polygonConfig.strokeDashArray, polygonStrokeDashArray = _33 === void 0 ? radarChartDefaults.polygonConfig
83
- .strokeDashArray : _33, _34 = polygonConfig.fill, polygonFill = _34 === void 0 ? radarChartDefaults.polygonConfig.fill : _34, _35 = polygonConfig.gradientColor, polygonGradientColor = _35 === void 0 ? radarChartDefaults.polygonConfig
84
- .gradientColor : _35, _36 = polygonConfig.showGradient, polygonShowGradient = _36 === void 0 ? radarChartDefaults.polygonConfig
85
- .showGradient : _36, _37 = polygonConfig.opacity, polygonOpacity = _37 === void 0 ? radarChartDefaults.polygonConfig.opacity : _37, _38 = polygonConfig.gradientOpacity, polygonGradientOpacity = _38 === void 0 ? polygonOpacity : _38, showDataValuesAsLabels = polygonConfig.showDataValuesAsLabels, _39 = polygonConfig.isAnimated, polygonIsAnimated = _39 === void 0 ? isAnimated : _39, _40 = polygonConfig.animationDuration, polygonAnimationDuration = _40 === void 0 ? animationDuration : _40;
81
+ var _33 = polygonConfig.stroke, polygonStroke = _33 === void 0 ? radarChartDefaults.polygonConfig.stroke : _33, _34 = polygonConfig.strokeWidth, polygonStrokeWidth = _34 === void 0 ? radarChartDefaults.polygonConfig
82
+ .strokeWidth : _34, _35 = polygonConfig.strokeDashArray, polygonStrokeDashArray = _35 === void 0 ? radarChartDefaults.polygonConfig
83
+ .strokeDashArray : _35, _36 = polygonConfig.fill, polygonFill = _36 === void 0 ? radarChartDefaults.polygonConfig.fill : _36, _37 = polygonConfig.gradientColor, polygonGradientColor = _37 === void 0 ? radarChartDefaults.polygonConfig
84
+ .gradientColor : _37, _38 = polygonConfig.showGradient, polygonShowGradient = _38 === void 0 ? radarChartDefaults.polygonConfig
85
+ .showGradient : _38, _39 = polygonConfig.opacity, polygonOpacity = _39 === void 0 ? radarChartDefaults.polygonConfig.opacity : _39, _40 = polygonConfig.gradientOpacity, polygonGradientOpacity = _40 === void 0 ? polygonOpacity : _40, showDataValuesAsLabels = polygonConfig.showDataValuesAsLabels, _41 = polygonConfig.isAnimated, polygonIsAnimated = _41 === void 0 ? isAnimated : _41, _42 = polygonConfig.animationDuration, polygonAnimationDuration = _42 === void 0 ? animationDuration : _42;
86
86
  var polygonConfigArray = (_l = (_k = props.polygonConfigArray) === null || _k === void 0 ? void 0 : _k.map(function (set) {
87
87
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
88
88
  return ({
@@ -147,27 +147,27 @@ export var useRadarChart = function (props) {
147
147
  });
148
148
  });
149
149
  })) !== null && _r !== void 0 ? _r : (dataSet ? Array(dataSet.length).fill(dataLabelsConfigArray) : null);
150
- var _41 = asterLinesConfig.stroke, asterLinesStroke = _41 === void 0 ? gridStroke : _41, _42 = asterLinesConfig.strokeWidth, asterLinesStrokeWidth = _42 === void 0 ? gridStrokeWidth : _42, _43 = asterLinesConfig.strokeDashArray, asterLinesStrokeDashArray = _43 === void 0 ? radarChartDefaults.asterLineStrokeDashArray : _43;
150
+ var _43 = asterLinesConfig.stroke, asterLinesStroke = _43 === void 0 ? gridStroke : _43, _44 = asterLinesConfig.strokeWidth, asterLinesStrokeWidth = _44 === void 0 ? gridStrokeWidth : _44, _45 = asterLinesConfig.strokeDashArray, asterLinesStrokeDashArray = _45 === void 0 ? radarChartDefaults.asterLineStrokeDashArray : _45;
151
151
  // Calculate angles for each category
152
- var angleStep = 360 / labels.length;
152
+ var angleStep = (360 / labels.length) * (isClockWise ? -1 : 1);
153
153
  // Generate coordinates for the data points
154
154
  var points = data.map(function (value, index) {
155
- var angle = index * angleStep;
155
+ var angle = index * angleStep + startAngle;
156
156
  return polarToCartesian(angle, value);
157
157
  });
158
158
  var initialPoints = data.map(function (value, index) {
159
- var angle = index * angleStep;
159
+ var angle = index * angleStep + startAngle;
160
160
  return polarToCartesian(angle, 0);
161
161
  });
162
162
  var pointsArray = (_s = dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) {
163
163
  return set.map(function (value, index) {
164
- var angle = index * angleStep;
164
+ var angle = index * angleStep + startAngle;
165
165
  return polarToCartesian(angle, value);
166
166
  });
167
167
  })) !== null && _s !== void 0 ? _s : [];
168
168
  var initialPointsArray = (_t = dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) {
169
169
  return set.map(function (value, index) {
170
- var angle = index * angleStep;
170
+ var angle = index * angleStep + startAngle;
171
171
  return polarToCartesian(angle, 0);
172
172
  });
173
173
  })) !== null && _t !== void 0 ? _t : [];
@@ -193,7 +193,7 @@ export var useRadarChart = function (props) {
193
193
  var gridShowGradientLocal = gridItem.showGradient || gridShowGradient;
194
194
  var gridStrokeDashArrayLocal = gridItem.strokeDashArray || gridStrokeDashArray;
195
195
  var levelPoints = labels.map(function (_, index) {
196
- var angle = index * angleStep;
196
+ var angle = index * angleStep + startAngle;
197
197
  return polarToCartesian(angle, (level / noOfSections) * maxValue);
198
198
  });
199
199
  var levelPolygonPoints = levelPoints
@@ -279,6 +279,7 @@ export var useRadarChart = function (props) {
279
279
  hideLabels: hideLabels,
280
280
  hideAsterLines: hideAsterLines,
281
281
  getGridLevelProps: getGridLevelProps,
282
- animateTogether: animateTogether
282
+ animateTogether: animateTogether,
283
+ startAngle: startAngle
283
284
  };
284
285
  };
@@ -36,6 +36,8 @@ export interface RadarChartProps {
36
36
  isAnimated?: boolean;
37
37
  animationDuration?: number;
38
38
  animateTogether?: boolean;
39
+ startAngle?: number;
40
+ isClockWise?: boolean;
39
41
  }
40
42
  export interface StrokeConfig {
41
43
  stroke?: string;
@@ -39,7 +39,7 @@ import { AxesAndRulesDefaults, BarDefaults, chartTypes } from '../../utils/const
39
39
  import { computeMaxAndMinItems } from '../../utils';
40
40
  export var useBarAndLineChartsWrapper = function (props) {
41
41
  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;
42
- var chartType = props.chartType, containerHeight = props.containerHeight, noOfSectionsBelowXAxis = props.noOfSectionsBelowXAxis, sectionColors = props.sectionColors, stepHeight = props.stepHeight, negativeStepHeight = props.negativeStepHeight, labelsExtraHeight = props.labelsExtraHeight, yAxisLabelWidth = props.yAxisLabelWidth, horizontal = props.horizontal, rtl = props.rtl, shiftX = props.shiftX, shiftY = props.shiftY, initialSpacing = props.initialSpacing, data = props.data, dataSet = props.dataSet, stackData = props.stackData, secondaryData = props.secondaryData, barWidth = props.barWidth, xAxisThickness = props.xAxisThickness, totalWidth = props.totalWidth, spacing = props.spacing, lineConfig = props.lineConfig, lineConfig2 = props.lineConfig2, maxValue = props.maxValue, lineData = props.lineData, lineData2 = props.lineData2, animatedWidth = props.animatedWidth, lineBehindBars = props.lineBehindBars, points = props.points, points2 = props.points2, arrowPoints = props.arrowPoints, width = props.width, horizSections = props.horizSections, endSpacing = props.endSpacing, horizontalRulesStyle = props.horizontalRulesStyle, noOfSections = props.noOfSections, showFractionalValues = props.showFractionalValues, axesAndRulesProps = props.axesAndRulesProps, yAxisLabelTexts = props.yAxisLabelTexts, yAxisOffset = props.yAxisOffset, rotateYAxisTexts = props.rotateYAxisTexts, pointerConfig = props.pointerConfig, getPointerProps = props.getPointerProps, pointerIndex = props.pointerIndex, pointerX = props.pointerX, pointerY = props.pointerY, scrollEventThrottle = props.scrollEventThrottle, endReachedOffset = props.endReachedOffset, isRTL = props.isRTL, selectedIndex = props.selectedIndex, onlyPositive = props.onlyPositive, highlightEnabled = props.highlightEnabled, lowlightOpacity = props.lowlightOpacity, xAxisLabelsAtBottom = props.xAxisLabelsAtBottom;
42
+ var chartType = props.chartType, containerHeight = props.containerHeight, noOfSectionsBelowXAxis = props.noOfSectionsBelowXAxis, sectionColors = props.sectionColors, stepHeight = props.stepHeight, negativeStepHeight = props.negativeStepHeight, labelsExtraHeight = props.labelsExtraHeight, yAxisLabelWidth = props.yAxisLabelWidth, horizontal = props.horizontal, rtl = props.rtl, shiftX = props.shiftX, shiftY = props.shiftY, initialSpacing = props.initialSpacing, data = props.data, dataSet = props.dataSet, stackData = props.stackData, secondaryData = props.secondaryData, barWidth = props.barWidth, xAxisThickness = props.xAxisThickness, totalWidth = props.totalWidth, spacing = props.spacing, lineConfig = props.lineConfig, lineConfig2 = props.lineConfig2, maxValue = props.maxValue, lineData = props.lineData, lineData2 = props.lineData2, animatedWidth = props.animatedWidth, lineBehindBars = props.lineBehindBars, points = props.points, points2 = props.points2, arrowPoints = props.arrowPoints, width = props.width, horizSections = props.horizSections, endSpacing = props.endSpacing, horizontalRulesStyle = props.horizontalRulesStyle, noOfSections = props.noOfSections, showFractionalValues = props.showFractionalValues, axesAndRulesProps = props.axesAndRulesProps, yAxisLabelTexts = props.yAxisLabelTexts, yAxisOffset = props.yAxisOffset, rotateYAxisTexts = props.rotateYAxisTexts, pointerConfig = props.pointerConfig, getPointerProps = props.getPointerProps, pointerIndex = props.pointerIndex, pointerX = props.pointerX, pointerY = props.pointerY, scrollEventThrottle = props.scrollEventThrottle, endReachedOffset = props.endReachedOffset, isRTL = props.isRTL, selectedIndex = props.selectedIndex, onlyPositive = props.onlyPositive, highlightEnabled = props.highlightEnabled, lowlightOpacity = props.lowlightOpacity, xAxisLabelsAtBottom = props.xAxisLabelsAtBottom, floatingYAxisLabels = props.floatingYAxisLabels, allowFontScaling = props.allowFontScaling;
43
43
  var _20 = axesAndRulesProps.secondaryYAxisConfig, secondaryStepValue = _20.stepValue, secondaryNegativeStepValue = _20.negativeStepValue, secondaryNoOfSectionsBelowXAxis = _20.noOfSectionsBelowXAxis, showSecondaryFractionalValues = _20.showFractionalValues, secondaryRoundToDigits = _20.roundToDigits, secondaryStepHeight = _20.stepHeight, secondaryNegativeStepHeight = _20.negativeStepHeight;
44
44
  var primaryYAxisHeightBelowOrigin = noOfSectionsBelowXAxis * negativeStepHeight;
45
45
  var secondaryYAxisHeightBelowOrigin = secondaryNoOfSectionsBelowXAxis * secondaryNegativeStepHeight;
@@ -182,7 +182,9 @@ export var useBarAndLineChartsWrapper = function (props) {
182
182
  secondaryStepHeight: secondaryStepHeight,
183
183
  secondaryNegativeStepHeight: secondaryNegativeStepHeight,
184
184
  customBackground: props.customBackground,
185
- onlyPositive: onlyPositive
185
+ onlyPositive: onlyPositive,
186
+ floatingYAxisLabels: floatingYAxisLabels,
187
+ allowFontScaling: allowFontScaling
186
188
  };
187
189
  var lineInBarChartProps = {
188
190
  yAxisLabelWidth: yAxisLabelWidth,
@@ -191,7 +193,9 @@ export var useBarAndLineChartsWrapper = function (props) {
191
193
  containerHeight: containerHeight,
192
194
  containerHeightIncludingBelowXAxis: containerHeightIncludingBelowXAxis,
193
195
  lineConfig: lineConfig,
194
- maxValue: (_15 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _15 !== void 0 ? _15 : maxValue,
196
+ maxValue: (lineConfig === null || lineConfig === void 0 ? void 0 : lineConfig.isSecondary)
197
+ ? (_15 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _15 !== void 0 ? _15 : maxValue
198
+ : maxValue,
195
199
  animatedWidth: animatedWidth,
196
200
  lineBehindBars: lineBehindBars,
197
201
  points: points,
@@ -75,6 +75,7 @@ export declare const AxesAndRulesDefaults: {
75
75
  showFractionalValues: boolean;
76
76
  roundToDigits: number;
77
77
  referenceLinesOverChartContent: boolean;
78
+ allowFontScaling: boolean;
78
79
  };
79
80
  export declare const defaultArrowConfig: {
80
81
  length: number;
@@ -312,4 +313,6 @@ export declare const radarChartDefaults: {
312
313
  isAnimated: boolean;
313
314
  animationDuration: number;
314
315
  animateTogether: boolean;
316
+ startAngle: number;
317
+ isClockWise: boolean;
315
318
  };
@@ -84,7 +84,8 @@ export var AxesAndRulesDefaults = {
84
84
  yAxisEmptyLabelWidth: 10,
85
85
  showFractionalValues: false,
86
86
  roundToDigits: 1,
87
- referenceLinesOverChartContent: true
87
+ referenceLinesOverChartContent: true,
88
+ allowFontScaling: true
88
89
  };
89
90
  export var defaultArrowConfig = {
90
91
  length: 10,
@@ -364,5 +365,7 @@ export var radarChartDefaults = {
364
365
  asterLineStrokeDashArray: [4, 4],
365
366
  isAnimated: false,
366
367
  animationDuration: 800,
367
- animateTogether: false
368
+ animateTogether: false,
369
+ startAngle: 0,
370
+ isClockWise: false
368
371
  };
@@ -104,6 +104,7 @@ export declare const getBarWidth: (isFocused?: boolean, focusedBarConfig?: Focus
104
104
  export declare const getInterpolatedData: (dataParam: lineDataItem[], showDataPointsForMissingValues?: boolean, interpolateMissingValues?: boolean, onlyPositive?: boolean) => lineDataItemNullSafe[];
105
105
  export declare const getLineSegmentsDueToNoExtrapolation: (data?: lineDataItem[]) => LineSegment[] | undefined;
106
106
  export declare const getLineSegmentsForMissingValues: (data?: lineDataItem[]) => LineSegment[] | undefined;
107
+ export declare const colorsToLowerCase: (lineSegments?: LineSegment[]) => LineSegment[] | undefined;
107
108
  export declare const getTextSizeForPieLabels: (textSize: number, radius: number) => number;
108
109
  export declare const adjustToOffset: (data: lineDataItemNullSafe[], yAxisOffset?: number) => lineDataItemNullSafe[];
109
110
  export declare const getSanitisedData: (data: lineDataItem[] | undefined, dataSanitisationProps: IDataSanitisationProps) => lineDataItemNullSafe[];
@@ -1037,6 +1037,14 @@ export var getLineSegmentsForMissingValues = function (data) {
1037
1037
  }
1038
1038
  return segments;
1039
1039
  };
1040
+ export var colorsToLowerCase = function (lineSegments) {
1041
+ return lineSegments === null || lineSegments === void 0 ? void 0 : lineSegments.map(function (segment) {
1042
+ if (segment.color && segment.color.toString().startsWith('#')) {
1043
+ segment.color = segment.color.toString().toLowerCase();
1044
+ }
1045
+ return segment;
1046
+ });
1047
+ };
1040
1048
  export var getTextSizeForPieLabels = function (textSize, radius) { return (textSize ? Math.min(textSize, radius / 5) : 16); };
1041
1049
  export var adjustToOffset = function (data, yAxisOffset) {
1042
1050
  return data.map(function (item) { return (__assign(__assign({}, item), { value: item.value - (yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0) })); });
@@ -249,6 +249,7 @@ export interface horizSectionPropTypes {
249
249
  secondaryYAxis: secondaryYAxisType | null;
250
250
  formatYLabel?: (label: string) => string;
251
251
  onlyReferenceLines?: boolean;
252
+ onlyLabels?: boolean;
252
253
  renderReferenceLines?: boolean;
253
254
  secondaryXAxis?: XAxisConfig;
254
255
  secondaryMaxItem: number;
@@ -262,6 +263,8 @@ export interface horizSectionPropTypes {
262
263
  secondaryNegativeStepHeight: number;
263
264
  customBackground?: CustomBackground;
264
265
  onlyPositive?: boolean;
266
+ floatingYAxisLabels?: boolean;
267
+ allowFontScaling: boolean;
265
268
  }
266
269
  interface HorizSectionObject {
267
270
  value: string;
@@ -276,6 +279,8 @@ export interface BarAndLineChartsWrapperTypes {
276
279
  negativeStepHeight: number;
277
280
  labelsExtraHeight: number;
278
281
  yAxisLabelWidth: number;
282
+ floatingYAxisLabels?: boolean;
283
+ allowFontScaling: boolean;
279
284
  horizontal: boolean;
280
285
  rtl: boolean;
281
286
  shiftX: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.66",
3
+ "version": "0.1.68",
4
4
  "description": "Mathematical and logical utilities used by react-gifted-charts and react-native-gifted-charts",
5
5
  "main": "./dist/index.js",
6
6
  "files": [