gifted-charts-core 0.0.31 → 0.0.32

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.31",
3
+ "version": "0.0.32",
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": [
@@ -3,10 +3,7 @@ import { type LineChartPropsType, type lineDataItem } from './types';
3
3
  import { type BarAndLineChartsWrapperTypes, EdgePosition, type LineSegment } from '../utils/types';
4
4
  import { type Animated } from 'react-native';
5
5
  export interface extendedLineChartPropsType extends LineChartPropsType {
6
- animations: Animated.Value[];
7
- heightValue: Animated.Value;
8
- widthValue: Animated.Value;
9
- opacValue: Animated.Value;
6
+ animations?: Animated.Value[];
10
7
  screenWidth: number;
11
8
  }
12
9
  export declare const useLineChart: (props: extendedLineChartPropsType) => {
@@ -225,7 +225,7 @@ export var useLineChart = function (props) {
225
225
  return extendedContainerHeight - (value * containerHeight) / secondaryMaxValue;
226
226
  };
227
227
  var heightUptoXaxis = extendedContainerHeight - xAxisThickness;
228
- if (animateOnDataChange) {
228
+ if (animateOnDataChange && animations) {
229
229
  animations.forEach(function (item, index) {
230
230
  item.addListener(function (val) {
231
231
  var _a, _b, _c, _d, _e;
@@ -39,10 +39,10 @@ import {
39
39
  import { type Animated } from 'react-native'
40
40
 
41
41
  export interface extendedLineChartPropsType extends LineChartPropsType {
42
- animations: Animated.Value[]
43
- heightValue: Animated.Value
44
- widthValue: Animated.Value
45
- opacValue: Animated.Value
42
+ animations?: Animated.Value[]
43
+ // heightValue: Animated.Value
44
+ // widthValue: Animated.Value
45
+ // opacValue: Animated.Value
46
46
  screenWidth: number
47
47
  }
48
48
 
@@ -440,7 +440,7 @@ export const useLineChart = (props: extendedLineChartPropsType) => {
440
440
  extendedContainerHeight - (value * containerHeight) / secondaryMaxValue
441
441
  const heightUptoXaxis = extendedContainerHeight - xAxisThickness
442
442
 
443
- if (animateOnDataChange) {
443
+ if (animateOnDataChange && animations) {
444
444
  animations.forEach((item, index) => {
445
445
  item.addListener((val) => {
446
446
  const temp = data[index]?.value ?? 0