gifted-charts-core 0.1.48 → 0.1.49

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.
@@ -1,6 +1,6 @@
1
1
  import { GestureResponderEvent, type ColorValue } from 'react-native';
2
2
  import { type yAxisSides } from '../utils/constants';
3
- import { XAxisConfig, type CurveType, type DataSet, type EdgePosition, type HighlightedRange, type LineSegment, type Pointer, type RuleType, type RulesConfig, type arrowConfigType, type referenceConfigType, type secondaryLineConfigType, type secondaryYAxisType, type Linecap, type IntersectionAreaConfig } from '../utils/types';
3
+ import { XAxisConfig, type CurveType, type DataSet, type EdgePosition, type HighlightedRange, type LineSegment, type Pointer, type RuleType, type RulesConfig, type arrowConfigType, type referenceConfigType, type secondaryLineConfigType, type secondaryYAxisType, type Linecap, type IntersectionAreaConfig, CustomBackground } from '../utils/types';
4
4
  export interface LineChartPropsType {
5
5
  height?: number;
6
6
  overflowTop?: number;
@@ -161,10 +161,13 @@ export interface LineChartPropsType {
161
161
  yAxisLabelWidth?: number;
162
162
  hideYAxisText?: boolean;
163
163
  backgroundColor?: ColorValue;
164
+ customBackground?: CustomBackground;
164
165
  curved?: boolean;
165
166
  curvature?: number;
166
167
  curveType?: CurveType;
167
168
  horizSections?: sectionType[];
169
+ focusTogether?: boolean;
170
+ focusProximity?: number;
168
171
  hideDataPoints?: boolean;
169
172
  dataPointsHeight?: number;
170
173
  dataPointsWidth?: number;
@@ -38,7 +38,7 @@ import { useEffect, useState } from 'react';
38
38
  import { AxesAndRulesDefaults, BarDefaults } from '../../utils/constants';
39
39
  import { computeMaxAndMinItems } from '../../utils';
40
40
  export var useBarAndLineChartsWrapper = function (props) {
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;
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
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;
43
43
  var yAxisAtTop = rtl ? !props.yAxisAtTop : props.yAxisAtTop;
44
44
  var hideOrigin = (_a = axesAndRulesProps.hideOrigin) !== null && _a !== void 0 ? _a : AxesAndRulesDefaults.hideOrigin;
@@ -104,8 +104,8 @@ export var useBarAndLineChartsWrapper = function (props) {
104
104
  var secondaryDataArrayWithMinValue = (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length)
105
105
  ? secondaryData
106
106
  : setWithMinValueInDataset === null || setWithMinValueInDataset === void 0 ? void 0 : setWithMinValueInDataset.data;
107
- var _19 = computeMaxAndMinItems(secondaryDataArrayWithMinValue, (_13 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.roundToDigits) !== null && _13 !== void 0 ? _13 : roundToDigits, (_14 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.showFractionalValues) !== null && _14 !== void 0 ? _14 : showFractionalValues), secondaryMaxItem = _19.maxItem, secondaryMinItem = _19.minItem;
108
- 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;
107
+ var _20 = computeMaxAndMinItems(secondaryDataArrayWithMinValue, (_13 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.roundToDigits) !== null && _13 !== void 0 ? _13 : roundToDigits, (_14 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.showFractionalValues) !== null && _14 !== void 0 ? _14 : showFractionalValues), secondaryMaxItem = _20.maxItem, secondaryMinItem = _20.minItem;
108
+ var _21 = axesAndRulesProps.secondaryYAxisConfig, secondaryStepValue = _21.stepValue, secondaryNegativeStepValue = _21.negativeStepValue, secondaryNoOfSectionsBelowXAxis = _21.noOfSectionsBelowXAxis, showSecondaryFractionalValues = _21.showFractionalValues, secondaryRoundToDigits = _21.roundToDigits, secondaryStepHeight = _21.stepHeight, secondaryNegativeStepHeight = _21.negativeStepHeight;
109
109
  var primaryYAxisHeightBelowOrigin = noOfSectionsBelowXAxis * negativeStepHeight;
110
110
  var secondaryYAxisHeightBelowOrigin = secondaryNoOfSectionsBelowXAxis * secondaryNegativeStepHeight;
111
111
  var biggerNegativeYAxisHeight = Math.max(primaryYAxisHeightBelowOrigin, secondaryYAxisHeightBelowOrigin);
@@ -178,7 +178,8 @@ export var useBarAndLineChartsWrapper = function (props) {
178
178
  showSecondaryFractionalValues: showSecondaryFractionalValues,
179
179
  secondaryRoundToDigits: secondaryRoundToDigits,
180
180
  secondaryStepHeight: secondaryStepHeight,
181
- secondaryNegativeStepHeight: secondaryNegativeStepHeight
181
+ secondaryNegativeStepHeight: secondaryNegativeStepHeight,
182
+ customBackground: props.customBackground
182
183
  };
183
184
  var lineInBarChartProps = {
184
185
  yAxisLabelWidth: yAxisLabelWidth,
@@ -201,15 +202,16 @@ export var useBarAndLineChartsWrapper = function (props) {
201
202
  selectedIndex: selectedIndex,
202
203
  yAxisOffset: (lineConfig === null || lineConfig === void 0 ? void 0 : lineConfig.isSecondary)
203
204
  ? (_16 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisOffset) !== null && _16 !== void 0 ? _16 : 0
204
- : yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0
205
+ : yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0,
206
+ strokeDashArray: (_17 = lineConfig === null || lineConfig === void 0 ? void 0 : lineConfig.strokeDashArray) !== null && _17 !== void 0 ? _17 : [0, 0]
205
207
  };
206
208
  var lineInBarChartProps2 = __assign(__assign({}, lineInBarChartProps), { lineConfig: lineConfig2, points: points2, data: lineData2 !== null && lineData2 !== void 0 ? lineData2 : [], yAxisOffset: (lineConfig2 === null || lineConfig2 === void 0 ? void 0 : lineConfig2.isSecondary)
207
- ? (_17 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisOffset) !== null && _17 !== void 0 ? _17 : 0
209
+ ? (_18 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisOffset) !== null && _18 !== void 0 ? _18 : 0
208
210
  : yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0 });
209
211
  var verticalLinesProps = {
210
212
  verticalLinesAr: verticalLinesAr,
211
213
  verticalLinesSpacing: verticalLinesSpacing,
212
- spacing: (_18 = lineConfig === null || lineConfig === void 0 ? void 0 : lineConfig.spacing) !== null && _18 !== void 0 ? _18 : spacing,
214
+ spacing: (_19 = lineConfig === null || lineConfig === void 0 ? void 0 : lineConfig.spacing) !== null && _19 !== void 0 ? _19 : spacing,
213
215
  initialSpacing: initialSpacing,
214
216
  verticalLinesZIndex: verticalLinesZIndex,
215
217
  verticalLinesHeight: verticalLinesHeight,
@@ -264,7 +266,7 @@ export var useBarAndLineChartsWrapper = function (props) {
264
266
  : difBwWidthHeight - 40) /
265
267
  2 +
266
268
  (yAxisAtTop ? (rtl ? (props.width ? 12 : 40) : 12) : 52), ")");
267
- var _21 = __read(useState(false), 2), canMomentum = _21[0], setCanMomentum = _21[1];
269
+ var _22 = __read(useState(false), 2), canMomentum = _22[0], setCanMomentum = _22[1];
268
270
  var isCloseToEnd = function (_a) {
269
271
  var layoutMeasurement = _a.layoutMeasurement, contentOffset = _a.contentOffset, contentSize = _a.contentSize;
270
272
  return isRTL
@@ -187,10 +187,12 @@ export declare const defaultPointerConfig: {
187
187
  autoAdjustPointerLabelPosition: boolean;
188
188
  pointerVanishDelay: number;
189
189
  activatePointersOnLongPress: boolean;
190
+ activatePointersInstantlyOnTouch: boolean;
190
191
  activatePointersDelay: number;
191
192
  initialPointerIndex: number;
192
193
  initialPointerAppearDelay: number;
193
194
  persistPointer: boolean;
195
+ resetPointerIndexOnRelease: boolean;
194
196
  hidePointers: boolean;
195
197
  hidePointer1: boolean;
196
198
  hidePointer2: boolean;
@@ -229,10 +229,12 @@ export var defaultPointerConfig = {
229
229
  autoAdjustPointerLabelPosition: false,
230
230
  pointerVanishDelay: 150,
231
231
  activatePointersOnLongPress: false,
232
+ activatePointersInstantlyOnTouch: true,
232
233
  activatePointersDelay: 150,
233
234
  initialPointerIndex: -1,
234
235
  initialPointerAppearDelay: 0,
235
236
  persistPointer: false,
237
+ resetPointerIndexOnRelease: false,
236
238
  hidePointers: false,
237
239
  hidePointer1: false,
238
240
  hidePointer2: false,
@@ -788,7 +788,7 @@ export var clone = function (obj) {
788
788
  return temp;
789
789
  };
790
790
  export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
791
- 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;
791
+ 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;
792
792
  return {
793
793
  initialSpacing: (_b = (_a = lineConfig.initialSpacing) !== null && _a !== void 0 ? _a : barInitialSpacing) !== null && _b !== void 0 ? _b : defaultLineConfig.initialSpacing,
794
794
  spacing: lineConfig.spacing,
@@ -799,37 +799,38 @@ export var getLineConfigForBarChart = function (lineConfig, barInitialSpacing) {
799
799
  animationDuration: (_g = lineConfig.animationDuration) !== null && _g !== void 0 ? _g : defaultLineConfig.animationDuration,
800
800
  thickness: (_h = lineConfig.thickness) !== null && _h !== void 0 ? _h : defaultLineConfig.thickness,
801
801
  color: (_j = lineConfig.color) !== null && _j !== void 0 ? _j : defaultLineConfig.color,
802
- hideDataPoints: (_k = lineConfig.hideDataPoints) !== null && _k !== void 0 ? _k : defaultLineConfig.hideDataPoints,
803
- dataPointsShape: (_l = lineConfig.dataPointsShape) !== null && _l !== void 0 ? _l : defaultLineConfig.dataPointsShape,
804
- dataPointsHeight: (_m = lineConfig.dataPointsHeight) !== null && _m !== void 0 ? _m : defaultLineConfig.dataPointsHeight,
805
- dataPointsWidth: (_o = lineConfig.dataPointsWidth) !== null && _o !== void 0 ? _o : defaultLineConfig.dataPointsWidth,
806
- dataPointsColor: (_p = lineConfig.dataPointsColor) !== null && _p !== void 0 ? _p : defaultLineConfig.dataPointsColor,
807
- dataPointsRadius: (_q = lineConfig.dataPointsRadius) !== null && _q !== void 0 ? _q : defaultLineConfig.dataPointsRadius,
808
- textColor: (_r = lineConfig.textColor) !== null && _r !== void 0 ? _r : defaultLineConfig.textColor,
809
- textFontSize: (_s = lineConfig.textFontSize) !== null && _s !== void 0 ? _s : defaultLineConfig.textFontSize,
810
- textShiftX: (_t = lineConfig.textShiftX) !== null && _t !== void 0 ? _t : defaultLineConfig.textShiftX,
811
- textShiftY: (_u = lineConfig.textShiftY) !== null && _u !== void 0 ? _u : defaultLineConfig.textShiftY,
812
- shiftX: (_v = lineConfig.shiftX) !== null && _v !== void 0 ? _v : defaultLineConfig.shiftX,
813
- shiftY: (_w = lineConfig.shiftY) !== null && _w !== void 0 ? _w : defaultLineConfig.shiftY,
814
- delay: (_x = lineConfig.delay) !== null && _x !== void 0 ? _x : defaultLineConfig.delay,
815
- startIndex: (_y = lineConfig.startIndex) !== null && _y !== void 0 ? _y : defaultLineConfig.startIndex,
802
+ strokeDashArray: (_k = lineConfig.strokeDashArray) !== null && _k !== void 0 ? _k : [0, 0],
803
+ hideDataPoints: (_l = lineConfig.hideDataPoints) !== null && _l !== void 0 ? _l : defaultLineConfig.hideDataPoints,
804
+ dataPointsShape: (_m = lineConfig.dataPointsShape) !== null && _m !== void 0 ? _m : defaultLineConfig.dataPointsShape,
805
+ dataPointsHeight: (_o = lineConfig.dataPointsHeight) !== null && _o !== void 0 ? _o : defaultLineConfig.dataPointsHeight,
806
+ dataPointsWidth: (_p = lineConfig.dataPointsWidth) !== null && _p !== void 0 ? _p : defaultLineConfig.dataPointsWidth,
807
+ dataPointsColor: (_q = lineConfig.dataPointsColor) !== null && _q !== void 0 ? _q : defaultLineConfig.dataPointsColor,
808
+ dataPointsRadius: (_r = lineConfig.dataPointsRadius) !== null && _r !== void 0 ? _r : defaultLineConfig.dataPointsRadius,
809
+ textColor: (_s = lineConfig.textColor) !== null && _s !== void 0 ? _s : defaultLineConfig.textColor,
810
+ textFontSize: (_t = lineConfig.textFontSize) !== null && _t !== void 0 ? _t : defaultLineConfig.textFontSize,
811
+ textShiftX: (_u = lineConfig.textShiftX) !== null && _u !== void 0 ? _u : defaultLineConfig.textShiftX,
812
+ textShiftY: (_v = lineConfig.textShiftY) !== null && _v !== void 0 ? _v : defaultLineConfig.textShiftY,
813
+ shiftX: (_w = lineConfig.shiftX) !== null && _w !== void 0 ? _w : defaultLineConfig.shiftX,
814
+ shiftY: (_x = lineConfig.shiftY) !== null && _x !== void 0 ? _x : defaultLineConfig.shiftY,
815
+ delay: (_y = lineConfig.delay) !== null && _y !== void 0 ? _y : defaultLineConfig.delay,
816
+ startIndex: (_z = lineConfig.startIndex) !== null && _z !== void 0 ? _z : defaultLineConfig.startIndex,
816
817
  endIndex: lineConfig.endIndex === 0
817
818
  ? 0
818
- : (_z = lineConfig.endIndex) !== null && _z !== void 0 ? _z : defaultLineConfig.endIndex,
819
- showArrow: (_0 = lineConfig.showArrow) !== null && _0 !== void 0 ? _0 : defaultLineConfig.showArrow,
819
+ : (_0 = lineConfig.endIndex) !== null && _0 !== void 0 ? _0 : defaultLineConfig.endIndex,
820
+ showArrow: (_1 = lineConfig.showArrow) !== null && _1 !== void 0 ? _1 : defaultLineConfig.showArrow,
820
821
  arrowConfig: {
821
- length: (_2 = (_1 = lineConfig.arrowConfig) === null || _1 === void 0 ? void 0 : _1.length) !== null && _2 !== void 0 ? _2 : (_3 = defaultLineConfig.arrowConfig) === null || _3 === void 0 ? void 0 : _3.length,
822
- width: (_5 = (_4 = lineConfig.arrowConfig) === null || _4 === void 0 ? void 0 : _4.width) !== null && _5 !== void 0 ? _5 : (_6 = defaultLineConfig.arrowConfig) === null || _6 === void 0 ? void 0 : _6.width,
823
- strokeWidth: (_8 = (_7 = lineConfig.arrowConfig) === null || _7 === void 0 ? void 0 : _7.strokeWidth) !== null && _8 !== void 0 ? _8 : (_9 = defaultLineConfig.arrowConfig) === null || _9 === void 0 ? void 0 : _9.strokeWidth,
824
- strokeColor: (_11 = (_10 = lineConfig.arrowConfig) === null || _10 === void 0 ? void 0 : _10.strokeColor) !== null && _11 !== void 0 ? _11 : (_12 = defaultLineConfig.arrowConfig) === null || _12 === void 0 ? void 0 : _12.strokeColor,
825
- fillColor: (_14 = (_13 = lineConfig.arrowConfig) === null || _13 === void 0 ? void 0 : _13.fillColor) !== null && _14 !== void 0 ? _14 : (_15 = defaultLineConfig.arrowConfig) === null || _15 === void 0 ? void 0 : _15.fillColor,
826
- showArrowBase: (_17 = (_16 = lineConfig.arrowConfig) === null || _16 === void 0 ? void 0 : _16.showArrowBase) !== null && _17 !== void 0 ? _17 : (_18 = defaultLineConfig.arrowConfig) === null || _18 === void 0 ? void 0 : _18.showArrowBase
822
+ length: (_3 = (_2 = lineConfig.arrowConfig) === null || _2 === void 0 ? void 0 : _2.length) !== null && _3 !== void 0 ? _3 : (_4 = defaultLineConfig.arrowConfig) === null || _4 === void 0 ? void 0 : _4.length,
823
+ width: (_6 = (_5 = lineConfig.arrowConfig) === null || _5 === void 0 ? void 0 : _5.width) !== null && _6 !== void 0 ? _6 : (_7 = defaultLineConfig.arrowConfig) === null || _7 === void 0 ? void 0 : _7.width,
824
+ strokeWidth: (_9 = (_8 = lineConfig.arrowConfig) === null || _8 === void 0 ? void 0 : _8.strokeWidth) !== null && _9 !== void 0 ? _9 : (_10 = defaultLineConfig.arrowConfig) === null || _10 === void 0 ? void 0 : _10.strokeWidth,
825
+ strokeColor: (_12 = (_11 = lineConfig.arrowConfig) === null || _11 === void 0 ? void 0 : _11.strokeColor) !== null && _12 !== void 0 ? _12 : (_13 = defaultLineConfig.arrowConfig) === null || _13 === void 0 ? void 0 : _13.strokeColor,
826
+ fillColor: (_15 = (_14 = lineConfig.arrowConfig) === null || _14 === void 0 ? void 0 : _14.fillColor) !== null && _15 !== void 0 ? _15 : (_16 = defaultLineConfig.arrowConfig) === null || _16 === void 0 ? void 0 : _16.fillColor,
827
+ showArrowBase: (_18 = (_17 = lineConfig.arrowConfig) === null || _17 === void 0 ? void 0 : _17.showArrowBase) !== null && _18 !== void 0 ? _18 : (_19 = defaultLineConfig.arrowConfig) === null || _19 === void 0 ? void 0 : _19.showArrowBase
827
828
  },
828
829
  customDataPoint: lineConfig.customDataPoint,
829
- isSecondary: (_19 = lineConfig.isSecondary) !== null && _19 !== void 0 ? _19 : defaultLineConfig.isSecondary,
830
- focusEnabled: (_20 = lineConfig.focusEnabled) !== null && _20 !== void 0 ? _20 : defaultLineConfig.focusEnabled,
831
- focusedDataPointColor: (_21 = lineConfig.focusedDataPointColor) !== null && _21 !== void 0 ? _21 : defaultLineConfig.focusedDataPointColor,
832
- focusedDataPointRadius: (_22 = lineConfig.focusedDataPointRadius) !== null && _22 !== void 0 ? _22 : defaultLineConfig.focusedDataPointRadius,
830
+ isSecondary: (_20 = lineConfig.isSecondary) !== null && _20 !== void 0 ? _20 : defaultLineConfig.isSecondary,
831
+ focusEnabled: (_21 = lineConfig.focusEnabled) !== null && _21 !== void 0 ? _21 : defaultLineConfig.focusEnabled,
832
+ focusedDataPointColor: (_22 = lineConfig.focusedDataPointColor) !== null && _22 !== void 0 ? _22 : defaultLineConfig.focusedDataPointColor,
833
+ focusedDataPointRadius: (_23 = lineConfig.focusedDataPointRadius) !== null && _23 !== void 0 ? _23 : defaultLineConfig.focusedDataPointRadius,
833
834
  focusedDataPointIndex: lineConfig.focusedDataPointIndex
834
835
  };
835
836
  };
@@ -9,6 +9,15 @@ export declare enum Framework {
9
9
  export type RuleType = 'solid' | 'dashed' | 'dotted' | string;
10
10
  export type LabelsPosition = 'onBorder' | 'outward' | 'inward' | 'mid';
11
11
  export type Linecap = 'butt' | 'square' | 'round';
12
+ export interface CustomBackground {
13
+ color?: ColorValue;
14
+ component?: Function;
15
+ horizontalShift?: number;
16
+ verticalShift?: number;
17
+ height?: number;
18
+ width?: number;
19
+ widthAdjustment?: number;
20
+ }
12
21
  export interface RuleTypes {
13
22
  SOLID: RuleType;
14
23
  DASHED: RuleType;
@@ -125,6 +134,7 @@ export interface LineInBarChartPropsType {
125
134
  xAxisLabelsVerticalShift: number;
126
135
  selectedIndex: number;
127
136
  yAxisOffset: number;
137
+ strokeDashArray: number[];
128
138
  }
129
139
  export interface DataPointProps {
130
140
  data: any[];
@@ -228,6 +238,7 @@ export interface horizSectionPropTypes {
228
238
  secondaryRoundToDigits: number;
229
239
  secondaryStepHeight: number;
230
240
  secondaryNegativeStepHeight: number;
241
+ customBackground?: CustomBackground;
231
242
  }
232
243
  interface HorizSectionObject {
233
244
  value: string;
@@ -306,6 +317,7 @@ export interface BarAndLineChartsWrapperTypes {
306
317
  extraWidthDueToDataPoint?: number;
307
318
  nestedScrollEnabled?: boolean;
308
319
  dataSet?: DataSet[];
320
+ customBackground?: CustomBackground;
309
321
  }
310
322
  export interface HorizontalStripConfig {
311
323
  thickness?: number;
@@ -349,10 +361,12 @@ export interface Pointer {
349
361
  pointerLabelHeight?: number;
350
362
  pointerVanishDelay?: number;
351
363
  activatePointersOnLongPress?: boolean;
364
+ activatePointersInstantlyOnTouch?: boolean;
352
365
  activatePointersDelay?: number;
353
366
  initialPointerIndex?: number;
354
367
  initialPointerAppearDelay?: number;
355
368
  persistPointer?: boolean;
369
+ resetPointerIndexOnRelease?: boolean;
356
370
  hidePointers?: boolean;
357
371
  hidePointer1?: boolean;
358
372
  hidePointer2?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
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": [