gifted-charts-core 0.0.29 → 0.0.31

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.0.29",
3
+ "version": "0.0.31",
4
4
  "description": "Mathematical and logical utilities used by react-gifted-charts and react-native-gifted-charts",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -46,6 +46,7 @@ export declare const useBarChart: (props: extendedBarChartPropsType) => {
46
46
  setPointerX: import("react").Dispatch<import("react").SetStateAction<number>>;
47
47
  setPointerIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
48
48
  maxValue: number;
49
+ maxItem: number;
49
50
  responderStartTime: number;
50
51
  responderActive: boolean;
51
52
  setResponderActive: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -538,6 +538,7 @@ export var useBarChart = function (props) {
538
538
  setPointerX: setPointerX,
539
539
  setPointerIndex: setPointerIndex,
540
540
  maxValue: maxValue,
541
+ maxItem: maxItem,
541
542
  responderStartTime: responderStartTime,
542
543
  responderActive: responderActive,
543
544
  setResponderActive: setResponderActive,
@@ -770,6 +770,7 @@ export const useBarChart = (props: extendedBarChartPropsType) => {
770
770
  setPointerX,
771
771
  setPointerIndex,
772
772
  maxValue,
773
+ maxItem,
773
774
  responderStartTime,
774
775
  responderActive,
775
776
  setResponderActive,
@@ -23,6 +23,7 @@ export declare const useBarAndLineChartsWrapper: (props: BarAndLineChartsWrapper
23
23
  rotate?: undefined;
24
24
  translateY?: undefined;
25
25
  })[];
26
+ transformForHorizontalForReactJS: string;
26
27
  horizSectionProps: horizSectionPropTypes;
27
28
  referenceLinesOverChartContent: any;
28
29
  setCanMomentum: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -216,6 +216,14 @@ export var useBarAndLineChartsWrapper = function (props) {
216
216
  (yAxisAtTop ? (rtl ? (props.width ? 12 : 40) : 12) : 52)
217
217
  }
218
218
  ];
219
+ var transformForHorizontalForReactJS = "rotate(".concat(rtl ? '-90deg' : '90deg', ")\n translateY(").concat(-shiftX + (rtl ? -difBwWidthHeight + 14 : difBwWidthHeight) / 2 - 20, ")\n translateX(").concat(shiftY +
220
+ (rtl
221
+ ? (props.width ? -98 - endSpacing : -75 - endSpacing) - difBwWidthHeight
222
+ : props.width
223
+ ? difBwWidthHeight
224
+ : difBwWidthHeight - 40) /
225
+ 2 +
226
+ (yAxisAtTop ? (rtl ? (props.width ? 12 : 40) : 12) : 52), ")");
219
227
  var _13 = __read(useState(false), 2), canMomentum = _13[0], setCanMomentum = _13[1];
220
228
  var isCloseToEnd = function (_a) {
221
229
  var layoutMeasurement = _a.layoutMeasurement, contentOffset = _a.contentOffset, contentSize = _a.contentSize;
@@ -249,6 +257,7 @@ export var useBarAndLineChartsWrapper = function (props) {
249
257
  xAxisTextNumberOfLines: xAxisTextNumberOfLines,
250
258
  actualContainerWidth: actualContainerWidth,
251
259
  transformForHorizontal: transformForHorizontal,
260
+ transformForHorizontalForReactJS: transformForHorizontalForReactJS,
252
261
  horizSectionProps: horizSectionProps,
253
262
  referenceLinesOverChartContent: referenceLinesOverChartContent,
254
263
  setCanMomentum: setCanMomentum,
@@ -316,6 +316,21 @@ export const useBarAndLineChartsWrapper = (
316
316
  }
317
317
  ]
318
318
 
319
+ const transformForHorizontalForReactJS = `rotate(${rtl ? '-90deg' : '90deg'})
320
+ translateY(${
321
+ -shiftX + (rtl ? -difBwWidthHeight + 14 : difBwWidthHeight) / 2 - 20
322
+ })
323
+ translateX(${
324
+ shiftY +
325
+ (rtl
326
+ ? (props.width ? -98 - endSpacing : -75 - endSpacing) - difBwWidthHeight
327
+ : props.width
328
+ ? difBwWidthHeight
329
+ : difBwWidthHeight - 40) /
330
+ 2 +
331
+ (yAxisAtTop ? (rtl ? (props.width ? 12 : 40) : 12) : 52)
332
+ })`
333
+
319
334
  const [canMomentum, setCanMomentum] = useState(false)
320
335
 
321
336
  const isCloseToEnd = ({
@@ -360,6 +375,7 @@ export const useBarAndLineChartsWrapper = (
360
375
  xAxisTextNumberOfLines,
361
376
  actualContainerWidth,
362
377
  transformForHorizontal,
378
+ transformForHorizontalForReactJS,
363
379
  horizSectionProps,
364
380
  referenceLinesOverChartContent,
365
381
  setCanMomentum,