gifted-charts-core 0.1.69 → 0.1.71

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.
@@ -654,7 +654,8 @@ export var useBarChart = function (props) {
654
654
  xAxisLabelsAtBottom: xAxisLabelsAtBottom,
655
655
  onScrollEndDrag: props.onScrollEndDrag,
656
656
  floatingYAxisLabels: floatingYAxisLabels,
657
- allowFontScaling: allowFontScaling
657
+ allowFontScaling: allowFontScaling,
658
+ showVerticalLines: props.showVerticalLines
658
659
  };
659
660
  return {
660
661
  lineConfig: lineConfig,
@@ -57,6 +57,15 @@ export interface stackDataItem {
57
57
  onMouseEnter?: Function;
58
58
  onMouseLeave?: Function;
59
59
  isSecondary?: boolean;
60
+ showVerticalLine?: boolean;
61
+ verticalLineThickness?: number;
62
+ verticalLineHeight?: number;
63
+ verticalLineColor?: ColorValue;
64
+ verticalLineStrokeDashArray?: number[];
65
+ verticalLineShift?: number;
66
+ verticalLineZIndex?: number;
67
+ verticalLineSpacing?: number;
68
+ verticalLineStrokeLinecap?: Linecap;
60
69
  }
61
70
  export interface StackedBarChartPropsType {
62
71
  style?: any;
@@ -375,6 +384,7 @@ export interface lineConfigType {
375
384
  dataPointsHeight?: number;
376
385
  dataPointsColor?: ColorValue | string | any;
377
386
  dataPointsRadius?: number;
387
+ dataPointLabelComponent?: (item: lineDataItem, index: number) => ReactNode;
378
388
  textColor?: ColorValue | string | any;
379
389
  textFontSize?: number;
380
390
  textShiftX?: number;
@@ -391,6 +401,7 @@ export interface lineConfigType {
391
401
  focusedDataPointColor?: ColorValue;
392
402
  focusedDataPointRadius?: number;
393
403
  focusedDataPointIndex?: number;
404
+ showDataPointLabelOnFocus?: boolean;
394
405
  }
395
406
  export interface defaultLineConfigType {
396
407
  initialSpacing: number;
@@ -408,6 +419,7 @@ export interface defaultLineConfigType {
408
419
  dataPointsHeight: number;
409
420
  dataPointsColor: ColorValue | string | any;
410
421
  dataPointsRadius: number;
422
+ dataPointLabelComponent?: (item: lineDataItem, index: number) => ReactNode;
411
423
  textColor: ColorValue | string | any;
412
424
  textFontSize: number;
413
425
  textShiftX: number;
@@ -423,6 +435,7 @@ export interface defaultLineConfigType {
423
435
  focusEnabled: boolean;
424
436
  focusedDataPointColor: ColorValue;
425
437
  focusedDataPointRadius: number;
438
+ showDataPointLabelOnFocus: boolean;
426
439
  }
427
440
  interface arrowType {
428
441
  length?: number;
@@ -482,6 +495,15 @@ export interface barDataItem {
482
495
  onContextMenu?: Function;
483
496
  onMouseEnter?: Function;
484
497
  onMouseLeave?: Function;
498
+ showVerticalLine?: boolean;
499
+ verticalLineThickness?: number;
500
+ verticalLineHeight?: number;
501
+ verticalLineColor?: ColorValue;
502
+ verticalLineStrokeDashArray?: number[];
503
+ verticalLineShift?: number;
504
+ verticalLineZIndex?: number;
505
+ verticalLineSpacing?: number;
506
+ verticalLineStrokeLinecap?: Linecap;
485
507
  }
486
508
  export interface barDataItemNullSafe extends barDataItem {
487
509
  value: number;
@@ -445,7 +445,8 @@ export var useLineChartBiColor = function (props) {
445
445
  xAxisLabelsAtBottom: false,
446
446
  onScrollEndDrag: props.onScrollEndDrag,
447
447
  floatingYAxisLabels: props.floatingYAxisLabels,
448
- allowFontScaling: allowFontScaling
448
+ allowFontScaling: allowFontScaling,
449
+ showVerticalLines: props.showVerticalLines
449
450
  };
450
451
  return {
451
452
  toggle: toggle,
@@ -1401,24 +1401,35 @@ export var useLineChart = function (props) {
1401
1401
  lowlightOpacity: LineDefaults.lowlightOpacity,
1402
1402
  xAxisLabelsAtBottom: xAxisLabelsAtBottom,
1403
1403
  onScrollEndDrag: props.onScrollEndDrag,
1404
- allowFontScaling: allowFontScaling
1404
+ allowFontScaling: allowFontScaling,
1405
+ showVerticalLines: props.showVerticalLines
1405
1406
  };
1406
1407
  var pointerItemLocal = [];
1407
1408
  if (pointerConfig) {
1408
- pointerItemLocal = [
1409
- __assign(__assign({}, pointerItem), { value: (_330 = (_329 = props.data) === null || _329 === void 0 ? void 0 : _329[pointerIndex]) === null || _330 === void 0 ? void 0 : _330.value })
1410
- ];
1411
- if (pointerY2 !== 0) {
1412
- pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_332 = (_331 = props.data2) === null || _331 === void 0 ? void 0 : _331[pointerIndex]) === null || _332 === void 0 ? void 0 : _332.value }));
1413
- }
1414
- if (pointerY3 !== 0) {
1415
- pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_334 = (_333 = props.data3) === null || _333 === void 0 ? void 0 : _333[pointerIndex]) === null || _334 === void 0 ? void 0 : _334.value }));
1416
- }
1417
- if (pointerY4 !== 0) {
1418
- pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_336 = (_335 = props.data4) === null || _335 === void 0 ? void 0 : _335[pointerIndex]) === null || _336 === void 0 ? void 0 : _336.value }));
1409
+ if (dataSet) {
1410
+ pointerItemLocal = dataSet.map(function (dataItem) {
1411
+ var _a, _b, _c;
1412
+ return ({
1413
+ value: (_c = (_b = (_a = dataItem === null || dataItem === void 0 ? void 0 : dataItem.data) === null || _a === void 0 ? void 0 : _a[pointerIndex]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : 0
1414
+ });
1415
+ });
1419
1416
  }
1420
- if (pointerY5 !== 0) {
1421
- pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_338 = (_337 = props.data5) === null || _337 === void 0 ? void 0 : _337[pointerIndex]) === null || _338 === void 0 ? void 0 : _338.value }));
1417
+ else {
1418
+ pointerItemLocal = [
1419
+ __assign(__assign({}, pointerItem), { value: (_330 = (_329 = props.data) === null || _329 === void 0 ? void 0 : _329[pointerIndex]) === null || _330 === void 0 ? void 0 : _330.value })
1420
+ ];
1421
+ if (pointerY2 !== 0) {
1422
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_332 = (_331 = props.data2) === null || _331 === void 0 ? void 0 : _331[pointerIndex]) === null || _332 === void 0 ? void 0 : _332.value }));
1423
+ }
1424
+ if (pointerY3 !== 0) {
1425
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_334 = (_333 = props.data3) === null || _333 === void 0 ? void 0 : _333[pointerIndex]) === null || _334 === void 0 ? void 0 : _334.value }));
1426
+ }
1427
+ if (pointerY4 !== 0) {
1428
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_336 = (_335 = props.data4) === null || _335 === void 0 ? void 0 : _335[pointerIndex]) === null || _336 === void 0 ? void 0 : _336.value }));
1429
+ }
1430
+ if (pointerY5 !== 0) {
1431
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_338 = (_337 = props.data5) === null || _337 === void 0 ? void 0 : _337[pointerIndex]) === null || _338 === void 0 ? void 0 : _338.value }));
1432
+ }
1422
1433
  }
1423
1434
  }
1424
1435
  return {
@@ -383,9 +383,13 @@ export interface lineDataItem {
383
383
  showVerticalLine?: boolean;
384
384
  verticalLineHeight?: number;
385
385
  verticalLineUptoDataPoint?: boolean;
386
- verticalLineColor?: string;
386
+ verticalLineColor?: ColorValue;
387
387
  verticalLineThickness?: number;
388
388
  verticalLineStrokeDashArray?: number[];
389
+ verticalLineShift?: number;
390
+ verticalLineZIndex?: number;
391
+ verticalLineSpacing?: number;
392
+ verticalLineStrokeLinecap?: Linecap;
389
393
  pointerShiftX?: number;
390
394
  pointerShiftY?: number;
391
395
  onPress?: Function;
@@ -436,7 +440,7 @@ export interface bicolorLineDataItem {
436
440
  showStrip?: boolean;
437
441
  showVerticalLine?: boolean;
438
442
  verticalLineUptoDataPoint?: boolean;
439
- verticalLineColor?: string;
443
+ verticalLineColor?: ColorValue;
440
444
  verticalLineThickness?: number;
441
445
  pointerShiftX?: number;
442
446
  pointerShiftY?: number;
@@ -42,7 +42,7 @@ export var getPieChartMainProps = function (props) {
42
42
  var isThreeD = props.isThreeD, isBiggerPie = props.isBiggerPie, paddingHorizontal = props.paddingHorizontal, paddingVertical = props.paddingVertical, extraRadius = props.extraRadius, showExternalLabels = props.showExternalLabels, externalLabelComponent = props.externalLabelComponent, showTooltip = props.showTooltip, tooltipWidth = props.tooltipWidth, persistTooltip = props.persistTooltip, tooltipComponent = props.tooltipComponent, _13 = props.tooltipDuration, tooltipDuration = _13 === void 0 ? PieTooltipDefaults.tooltipDuration : _13, _14 = props.tooltipVerticalShift, tooltipVerticalShift = _14 === void 0 ? PieTooltipDefaults.tooltipVerticalShift : _14, _15 = props.tooltipHorizontalShift, tooltipHorizontalShift = _15 === void 0 ? PieTooltipDefaults.tooltipHorizontalShift : _15, _16 = props.showValuesAsTooltipText, showValuesAsTooltipText = _16 === void 0 ? PieTooltipDefaults.showValuesAsTooltipText : _16, _17 = props.tooltipTextNoOfLines, tooltipTextNoOfLines = _17 === void 0 ? PieTooltipDefaults.tooltipTextNoOfLines : _17, _18 = props.tooltipBackgroundColor, tooltipBackgroundColor = _18 === void 0 ? PieTooltipDefaults.tooltipBackgroundColor : _18, _19 = props.tooltipBorderRadius, tooltipBorderRadius = _19 === void 0 ? PieTooltipDefaults.tooltipBorderRadius : _19, font = props.font, fontWeight = props.fontWeight, fontStyle = props.fontStyle, edgesPressable = props.edgesPressable, tooltipSelectedIndex = props.tooltipSelectedIndex, setTooltipSelectedIndex = props.setTooltipSelectedIndex;
43
43
  var propData = props.data;
44
44
  var data = [];
45
- var minisculeDataItem = props.data.map(function (item) { return item.value; }).reduce(function (v, a) { return v + a; }) / 160000;
45
+ var minisculeDataItem = props.data.map(function (item) { return item.value; }).reduce(function (v, a) { return v + a; }, 0) / 160000;
46
46
  var itemHasInnerComponent = false;
47
47
  if (propData) {
48
48
  for (var i = 0; i < propData.length; i++) {
@@ -132,7 +132,7 @@ export var getPieChartMainProps = function (props) {
132
132
  var cy = radius;
133
133
  total =
134
134
  data && data.length > 0
135
- ? data.map(function (item) { return item.value; }).reduce(function (v, a) { return v + a; })
135
+ ? data.map(function (item) { return item.value; }).reduce(function (v, a) { return v + a; }, 0)
136
136
  : 0;
137
137
  var acc = 0;
138
138
  var pData = data.map(function (item) {
@@ -60,7 +60,8 @@ 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 + Math.max(0, xAxisLabelShiftY);
63
+ var additionalHeightForShift = Math.max(0, xAxisLabelShiftY || 0);
64
+ var containerHeightWithXaxisLabels = containerHeight + xAxisLabelsHeight + additionalHeightForShift;
64
65
  var mid = (width + yAxisLabelWidth) / 2;
65
66
  var leftMax = Math.max.apply(Math, __spreadArray([], __read(data.map(function (item) { return item.left; })), false));
66
67
  var rightMax = Math.max.apply(Math, __spreadArray([], __read(data.map(function (item) { return item.right; })), false));
@@ -35,7 +35,18 @@ export declare const useBarAndLineChartsWrapper: (props: BarAndLineChartsWrapper
35
35
  yAxisSide: any;
36
36
  showVerticalLines: any;
37
37
  verticalLinesProps: {
38
- verticalLinesAr: number[];
38
+ showVerticalLines: boolean | undefined;
39
+ verticalLinesAr: number[] | {
40
+ showVerticalLine: any;
41
+ verticalLineThickness: any;
42
+ verticalLineHeight: any;
43
+ verticalLineColor: any;
44
+ verticalLineStrokeDashArray: any;
45
+ verticalLineShift: any;
46
+ verticalLineZIndex: any;
47
+ verticalLineSpacing: any;
48
+ verticalLineStrokeLinecap: any;
49
+ }[];
39
50
  verticalLinesSpacing: any;
40
51
  spacing: any;
41
52
  initialSpacing: number;
@@ -98,7 +98,20 @@ export var useBarAndLineChartsWrapper = function (props) {
98
98
  var noOfVerticalLines = axesAndRulesProps.noOfVerticalLines;
99
99
  var secondaryXAxis = axesAndRulesProps.secondaryXAxis;
100
100
  var verticalLinesAr = noOfVerticalLines
101
- ? __spreadArray([], __read(Array(noOfVerticalLines).keys()), false) : __spreadArray([], __read(Array(stackData ? stackData.length : data.length).keys()), false);
101
+ ? __spreadArray([], __read(Array(noOfVerticalLines).keys()), false) : (stackData !== null && stackData !== void 0 ? stackData : data).map(function (item) {
102
+ var showVerticalLine = item.showVerticalLine, verticalLineThickness = item.verticalLineThickness, verticalLineHeight = item.verticalLineHeight, verticalLineColor = item.verticalLineColor, verticalLineStrokeDashArray = item.verticalLineStrokeDashArray, verticalLineShift = item.verticalLineShift, verticalLineZIndex = item.verticalLineZIndex, verticalLineSpacing = item.verticalLineSpacing, verticalLineStrokeLinecap = item.verticalLineStrokeLinecap;
103
+ return {
104
+ showVerticalLine: showVerticalLine,
105
+ verticalLineThickness: verticalLineThickness,
106
+ verticalLineHeight: verticalLineHeight,
107
+ verticalLineColor: verticalLineColor,
108
+ verticalLineStrokeDashArray: verticalLineStrokeDashArray,
109
+ verticalLineShift: verticalLineShift,
110
+ verticalLineZIndex: verticalLineZIndex,
111
+ verticalLineSpacing: verticalLineSpacing,
112
+ verticalLineStrokeLinecap: verticalLineStrokeLinecap
113
+ };
114
+ });
102
115
  var extendedContainerHeight = containerHeight + overflowTop + 10;
103
116
  var dataSetArray = __spreadArray([], __read((dataSet !== null && dataSet !== void 0 ? dataSet : [])), false);
104
117
  var setWithMinValueInDataset = (_12 = (_11 = dataSetArray
@@ -218,6 +231,7 @@ export var useBarAndLineChartsWrapper = function (props) {
218
231
  ? (_18 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisOffset) !== null && _18 !== void 0 ? _18 : 0
219
232
  : yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0 });
220
233
  var verticalLinesProps = {
234
+ showVerticalLines: props.showVerticalLines,
221
235
  verticalLinesAr: verticalLinesAr,
222
236
  verticalLinesSpacing: verticalLinesSpacing,
223
237
  spacing: (_19 = lineConfig === null || lineConfig === void 0 ? void 0 : lineConfig.spacing) !== null && _19 !== void 0 ? _19 : spacing,
@@ -216,7 +216,8 @@ export var defaultLineConfig = {
216
216
  isSecondary: false,
217
217
  focusEnabled: false,
218
218
  focusedDataPointColor: LineDefaults.focusedDataPointColor,
219
- focusedDataPointRadius: LineDefaults.dataPointsRadius
219
+ focusedDataPointRadius: LineDefaults.dataPointsRadius,
220
+ showDataPointLabelOnFocus: LineDefaults.showDataPointLabelOnFocus
220
221
  };
221
222
  export var defaultPointerConfig = {
222
223
  height: 0,
@@ -494,7 +494,7 @@ export var getArrowPoints = function (arrowTipX, arrowTipY, x1, y1, arrowLength,
494
494
  return arrowPoints;
495
495
  };
496
496
  export var getAxesAndRulesProps = function (props, containerHeight, stepHeight, stepValue, noOfSections, roundToDigits, negativeStepValue, secondaryMaxValue, secondaryMinItem, showSecondaryFractionalValues, secondaryRoundToDigits) {
497
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
497
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
498
498
  var secondaryYAxis = typeof props.secondaryYAxis === 'boolean' ? {} : props.secondaryYAxis;
499
499
  var axesAndRulesProps = {
500
500
  yAxisSide: props.yAxisSide,
@@ -544,7 +544,7 @@ export var getAxesAndRulesProps = function (props, containerHeight, stepHeight,
544
544
  referenceLine3Config: props.referenceLine3Config,
545
545
  referenceLinesOverChartContent: props.referenceLinesOverChartContent
546
546
  },
547
- showVerticalLines: props.showVerticalLines,
547
+ showVerticalLines: (_d = props.showVerticalLines) !== null && _d !== void 0 ? _d : (_f = ((_e = props.stackData) !== null && _e !== void 0 ? _e : props.data)) === null || _f === void 0 ? void 0 : _f.some(function (item) { return item.showVerticalLine; }),
548
548
  verticalLinesThickness: props.verticalLinesThickness,
549
549
  verticalLinesHeight: props.verticalLinesHeight,
550
550
  verticalLinesColor: props.verticalLinesColor,
@@ -570,21 +570,21 @@ export var getAxesAndRulesProps = function (props, containerHeight, stepHeight,
570
570
  noOfSectionsBelowXAxis: 0
571
571
  }
572
572
  };
573
- if (((_d = props.secondaryYAxis) !== null && _d !== void 0 ? _d : (_e = props.lineConfig) === null || _e === void 0 ? void 0 : _e.isSecondary) &&
573
+ if (((_g = props.secondaryYAxis) !== null && _g !== void 0 ? _g : (_h = props.lineConfig) === null || _h === void 0 ? void 0 : _h.isSecondary) &&
574
574
  secondaryMaxValue !== undefined &&
575
575
  secondaryYAxis &&
576
576
  secondaryYAxis.maxValue === undefined) {
577
577
  axesAndRulesProps.secondaryYAxis = __assign(__assign({}, secondaryYAxis), { maxValue: secondaryMaxValue });
578
578
  }
579
- var secondaryNoOfSections = (_f = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSections) !== null && _f !== void 0 ? _f : noOfSections;
580
- var secondaryStepValue = (_g = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepValue) !== null && _g !== void 0 ? _g : ((_h = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _h !== void 0 ? _h : secondaryMaxValue) / secondaryNoOfSections;
581
- var secondaryStepHeight = (_j = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepHeight) !== null && _j !== void 0 ? _j : containerHeight / secondaryNoOfSections;
582
- var secondaryNegativeStepValue = (_k = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.negativeStepValue) !== null && _k !== void 0 ? _k : secondaryStepValue;
583
- var secondaryNoOfSectionsBelowXAxis = (_l = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSectionsBelowXAxis) !== null && _l !== void 0 ? _l : (secondaryNegativeStepValue
584
- ? Math.ceil(((_m = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.mostNegativeValue) !== null && _m !== void 0 ? _m : secondaryMinItem) /
579
+ var secondaryNoOfSections = (_j = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSections) !== null && _j !== void 0 ? _j : noOfSections;
580
+ var secondaryStepValue = (_k = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepValue) !== null && _k !== void 0 ? _k : ((_l = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _l !== void 0 ? _l : secondaryMaxValue) / secondaryNoOfSections;
581
+ var secondaryStepHeight = (_m = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepHeight) !== null && _m !== void 0 ? _m : containerHeight / secondaryNoOfSections;
582
+ var secondaryNegativeStepValue = (_o = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.negativeStepValue) !== null && _o !== void 0 ? _o : secondaryStepValue;
583
+ var secondaryNoOfSectionsBelowXAxis = (_p = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSectionsBelowXAxis) !== null && _p !== void 0 ? _p : (secondaryNegativeStepValue
584
+ ? Math.ceil(((_q = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.mostNegativeValue) !== null && _q !== void 0 ? _q : secondaryMinItem) /
585
585
  -secondaryNegativeStepValue)
586
586
  : 0);
587
- axesAndRulesProps.secondaryYAxisConfig = __assign(__assign({}, secondaryYAxis), { stepHeight: secondaryStepHeight, stepValue: secondaryStepValue, negativeStepHeight: (_o = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.negativeStepHeight) !== null && _o !== void 0 ? _o : secondaryStepHeight, negativeStepValue: secondaryNegativeStepValue, noOfSectionsBelowXAxis: secondaryNoOfSectionsBelowXAxis, showFractionalValues: showSecondaryFractionalValues, roundToDigits: secondaryRoundToDigits });
587
+ axesAndRulesProps.secondaryYAxisConfig = __assign(__assign({}, secondaryYAxis), { stepHeight: secondaryStepHeight, stepValue: secondaryStepValue, negativeStepHeight: (_r = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.negativeStepHeight) !== null && _r !== void 0 ? _r : secondaryStepHeight, negativeStepValue: secondaryNegativeStepValue, noOfSectionsBelowXAxis: secondaryNoOfSectionsBelowXAxis, showFractionalValues: showSecondaryFractionalValues, roundToDigits: secondaryRoundToDigits });
588
588
  return axesAndRulesProps;
589
589
  };
590
590
  export var getExtendedContainerHeightWithPadding = function (containerHeight, overflowTop) { return containerHeight + (overflowTop !== null && overflowTop !== void 0 ? overflowTop : 0) + 10; };
@@ -796,7 +796,7 @@ export var clone = function (obj) {
796
796
  return temp;
797
797
  };
798
798
  export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
799
- 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;
799
+ 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;
800
800
  return {
801
801
  initialSpacing: (_b = (_a = lineConfig.initialSpacing) !== null && _a !== void 0 ? _a : barInitialSpacing) !== null && _b !== void 0 ? _b : defaultLineConfig.initialSpacing,
802
802
  spacing: lineConfig.spacing,
@@ -814,6 +814,7 @@ export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
814
814
  dataPointsWidth: (_p = lineConfig.dataPointsWidth) !== null && _p !== void 0 ? _p : defaultLineConfig.dataPointsWidth,
815
815
  dataPointsColor: (_q = lineConfig.dataPointsColor) !== null && _q !== void 0 ? _q : defaultLineConfig.dataPointsColor,
816
816
  dataPointsRadius: (_r = lineConfig.dataPointsRadius) !== null && _r !== void 0 ? _r : defaultLineConfig.dataPointsRadius,
817
+ dataPointLabelComponent: lineConfig.dataPointLabelComponent,
817
818
  textColor: (_s = lineConfig.textColor) !== null && _s !== void 0 ? _s : defaultLineConfig.textColor,
818
819
  textFontSize: (_t = lineConfig.textFontSize) !== null && _t !== void 0 ? _t : defaultLineConfig.textFontSize,
819
820
  textShiftX: (_u = lineConfig.textShiftX) !== null && _u !== void 0 ? _u : defaultLineConfig.textShiftX,
@@ -839,7 +840,8 @@ export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
839
840
  focusEnabled: (_21 = lineConfig.focusEnabled) !== null && _21 !== void 0 ? _21 : defaultLineConfig.focusEnabled,
840
841
  focusedDataPointColor: (_22 = lineConfig.focusedDataPointColor) !== null && _22 !== void 0 ? _22 : defaultLineConfig.focusedDataPointColor,
841
842
  focusedDataPointRadius: (_23 = lineConfig.focusedDataPointRadius) !== null && _23 !== void 0 ? _23 : defaultLineConfig.focusedDataPointRadius,
842
- focusedDataPointIndex: lineConfig.focusedDataPointIndex
843
+ focusedDataPointIndex: lineConfig.focusedDataPointIndex,
844
+ showDataPointLabelOnFocus: (_24 = lineConfig.showDataPointLabelOnFocus) !== null && _24 !== void 0 ? _24 : defaultLineConfig.showDataPointLabelOnFocus
843
845
  };
844
846
  };
845
847
  export var getNoOfSections = function (noOfSections, maxValue, stepValue) {
@@ -169,6 +169,8 @@ export interface DataPointProps {
169
169
  selectedIndex: number;
170
170
  yAxisOffset: number;
171
171
  opacity: number;
172
+ svgHeight: number;
173
+ totalWidth: number;
172
174
  }
173
175
  export interface referenceConfigType {
174
176
  thickness?: number;
@@ -351,6 +353,7 @@ export interface BarAndLineChartsWrapperTypes {
351
353
  lowlightOpacity: number;
352
354
  xAxisLabelsAtBottom: boolean;
353
355
  onScrollEndDrag?: (event: any, direction: any) => void;
356
+ showVerticalLines?: boolean;
354
357
  }
355
358
  export interface HorizontalStripConfig {
356
359
  thickness?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
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": [