gifted-charts-core 0.0.35 → 0.0.37
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,17 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type LineChartBicolorPropsType, type bicolorLineDataItem } from './types';
|
|
3
3
|
import { type BarAndLineChartsWrapperTypes } from '../utils/types';
|
|
4
|
-
import { type Animated } from 'react-native';
|
|
5
4
|
interface Points {
|
|
6
5
|
points: string;
|
|
7
6
|
color: string;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
heightValue: Animated.Value;
|
|
11
|
-
widthValue: Animated.Value;
|
|
12
|
-
opacValue: Animated.Value;
|
|
13
|
-
}
|
|
14
|
-
export declare const useLineChartBiColor: (props: extendedLineChartBicolorPropsType) => {
|
|
8
|
+
export declare const useLineChartBiColor: (props: LineChartBicolorPropsType) => {
|
|
15
9
|
toggle: boolean;
|
|
16
10
|
setToggle: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
17
11
|
pointsArray: Points[];
|
|
@@ -19,13 +19,7 @@ interface Points {
|
|
|
19
19
|
color: string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
heightValue: Animated.Value
|
|
24
|
-
widthValue: Animated.Value
|
|
25
|
-
opacValue: Animated.Value
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const useLineChartBiColor = (props: extendedLineChartBicolorPropsType) => {
|
|
22
|
+
export const useLineChartBiColor = (props: LineChartBicolorPropsType) => {
|
|
29
23
|
const [toggle, setToggle] = useState(false)
|
|
30
24
|
const [pointsArray, setPointsArray] = useState<Points[]>([])
|
|
31
25
|
const [fillPointsArray, setFillPointsArray] = useState<Points[]>([])
|
package/src/utils/index.js
CHANGED
|
@@ -476,7 +476,7 @@ export var getArrowPoints = function (arrowTipX, arrowTipY, x1, y1, arrowLength,
|
|
|
476
476
|
return arrowPoints;
|
|
477
477
|
};
|
|
478
478
|
export var getAxesAndRulesProps = function (props, stepValue, maxValue) {
|
|
479
|
-
var _a, _b, _c;
|
|
479
|
+
var _a, _b, _c, _d;
|
|
480
480
|
var secondaryYAxis = !props.secondaryYAxis || props.secondaryYAxis === true
|
|
481
481
|
? {}
|
|
482
482
|
: props.secondaryYAxis;
|
|
@@ -492,6 +492,7 @@ export var getAxesAndRulesProps = function (props, stepValue, maxValue) {
|
|
|
492
492
|
xAxisLength: props.xAxisLength,
|
|
493
493
|
xAxisType: props.xAxisType,
|
|
494
494
|
xAxisTextNumberOfLines: (_a = props.xAxisTextNumberOfLines) !== null && _a !== void 0 ? _a : 1,
|
|
495
|
+
xAxisThickness: (_b = props.xAxisThickness) !== null && _b !== void 0 ? _b : AxesAndRulesDefaults.xAxisThickness,
|
|
495
496
|
xAxisLabelsHeight: props.xAxisLabelsHeight,
|
|
496
497
|
xAxisLabelsVerticalShift: props.xAxisLabelsVerticalShift,
|
|
497
498
|
dashWidth: props.dashWidth,
|
|
@@ -540,7 +541,7 @@ export var getAxesAndRulesProps = function (props, stepValue, maxValue) {
|
|
|
540
541
|
secondaryYAxis: props.secondaryYAxis,
|
|
541
542
|
formatYLabel: props.formatYLabel
|
|
542
543
|
};
|
|
543
|
-
if (((
|
|
544
|
+
if (((_c = props.secondaryYAxis) !== null && _c !== void 0 ? _c : (_d = props.lineConfig) === null || _d === void 0 ? void 0 : _d.isSecondary) &&
|
|
544
545
|
maxValue !== undefined) {
|
|
545
546
|
axesAndRulesProps.secondaryYAxis = __assign(__assign({}, secondaryYAxis), { maxValue: maxValue });
|
|
546
547
|
}
|
package/src/utils/index.ts
CHANGED
|
@@ -670,6 +670,7 @@ export const getAxesAndRulesProps = (
|
|
|
670
670
|
xAxisLength: props.xAxisLength,
|
|
671
671
|
xAxisType: props.xAxisType,
|
|
672
672
|
xAxisTextNumberOfLines: props.xAxisTextNumberOfLines ?? 1,
|
|
673
|
+
xAxisThickness: props.xAxisThickness ?? AxesAndRulesDefaults.xAxisThickness,
|
|
673
674
|
xAxisLabelsHeight: props.xAxisLabelsHeight,
|
|
674
675
|
xAxisLabelsVerticalShift: props.xAxisLabelsVerticalShift,
|
|
675
676
|
dashWidth: props.dashWidth,
|