gifted-charts-core 0.0.13 → 0.0.14

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.13",
3
+ "version": "0.0.14",
4
4
  "description": "Mathematical and logical utilities used by react-gifted-charts and react-native-gifted-charts",
5
5
  "main": "index.ts",
6
6
  "files": [
@@ -602,6 +602,7 @@ export const useBarChart = (props: extendedBarChartPropsType) => {
602
602
  patternId: props.patternId,
603
603
  onPress: props.onPress,
604
604
  onLongPress: props.onLongPress,
605
+ onPressOut: props.onPressOut,
605
606
  focusBarOnPress: props.focusBarOnPress,
606
607
  focusedBarConfig: props.focusedBarConfig,
607
608
  xAxisTextNumberOfLines: xAxisTextNumberOfLines,
@@ -613,6 +614,7 @@ export const useBarChart = (props: extendedBarChartPropsType) => {
613
614
  selectedIndex: selectedIndex,
614
615
  setSelectedIndex: setSelectedIndex,
615
616
  activeOpacity: props.activeOpacity || 0.2,
617
+ noOfSectionsBelowXAxis,
616
618
 
617
619
  leftShiftForLastIndexTooltip: props.leftShiftForLastIndexTooltip || 0,
618
620
  label:
@@ -13,6 +13,7 @@ import { Component, ReactNode } from "react";
13
13
  export type stackDataItem = {
14
14
  onPress?: any;
15
15
  onLongPress?: any;
16
+ onPressOut?: any;
16
17
  label?: String;
17
18
  barWidth?: number;
18
19
  spacing?: number;
@@ -77,6 +78,7 @@ export type StackedBarChartPropsType = {
77
78
  barWidth?: number;
78
79
  onPress?: Function;
79
80
  onLongPress?: Function;
81
+ onPressOut?: Function;
80
82
 
81
83
  rotateLabel?: boolean;
82
84
  showXAxisIndices: boolean;
@@ -280,6 +282,7 @@ export type BarChartPropsType = {
280
282
  barMarginBottom?: number;
281
283
  onPress?: Function;
282
284
  onLongPress?: Function;
285
+ onPressOut?: Function;
283
286
  renderTooltip?: Function;
284
287
  leftShiftForTooltip?: number;
285
288
  leftShiftForLastIndexTooltip?: number;
@@ -392,6 +395,7 @@ export type barDataItem = {
392
395
  value: number;
393
396
  onPress?: any;
394
397
  onLongPress?: any;
398
+ onPressOut?: any;
395
399
  frontColor?: ColorValue;
396
400
  sideColor?: ColorValue;
397
401
  topColor?: ColorValue;
@@ -532,6 +536,7 @@ export type RenderBarsPropsType = {
532
536
  barMarginBottom?: number;
533
537
  onPress?: Function;
534
538
  onLongPress?: Function;
539
+ onPressOut?: Function;
535
540
  xAxisTextNumberOfLines: number;
536
541
  xAxisLabelsHeight?: number;
537
542
  xAxisLabelsVerticalShift: number;
@@ -545,6 +550,7 @@ export type RenderBarsPropsType = {
545
550
  xAxisThickness?: number;
546
551
  pointerConfig?: Pointer;
547
552
  focusBarOnPress?: boolean;
553
+ noOfSectionsBelowXAxis?: number;
548
554
  };
549
555
 
550
556
  export type trianglePropTypes = {
@@ -1571,7 +1571,7 @@ export const useLineChart = (props: extendedLineChartPropsType) => {
1571
1571
  const stepHeight = props.stepHeight || containerHeight / noOfSections;
1572
1572
  const stepValue = props.stepValue || maxValue / noOfSections;
1573
1573
  const noOfSectionsBelowXAxis =
1574
- props.noOfSectionsBelowXAxis || -mostNegativeValue / (stepValue || 1);
1574
+ props.noOfSectionsBelowXAxis ?? -mostNegativeValue / (stepValue || 1);
1575
1575
 
1576
1576
  const showXAxisIndices =
1577
1577
  props.showXAxisIndices ?? AxesAndRulesDefaults.showXAxisIndices;