gifted-charts-core 0.0.40 → 0.0.41
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
package/src/PieChart/index.js
CHANGED
|
@@ -94,7 +94,7 @@ export var usePieChart = function (props) {
|
|
|
94
94
|
selectedIndex: selectedIndex,
|
|
95
95
|
setSelectedIndex: setSelectedIndex,
|
|
96
96
|
startAngle: pro ? (_u = props.startAngle) !== null && _u !== void 0 ? _u : 0 : startAngle,
|
|
97
|
-
endAngle: (_v = props.endAngle) !== null && _v !== void 0 ? _v : Math.PI * 2,
|
|
97
|
+
endAngle: (_v = props.endAngle) !== null && _v !== void 0 ? _v : startAngle + (semiCircle ? Math.PI : Math.PI * 2),
|
|
98
98
|
setStartAngle: setStartAngle,
|
|
99
99
|
total: total,
|
|
100
100
|
setTotal: setTotal,
|
package/src/PieChart/index.ts
CHANGED
|
@@ -144,7 +144,8 @@ export const usePieChart = (props: IPieChartPropsType): IusePieChart => {
|
|
|
144
144
|
selectedIndex,
|
|
145
145
|
setSelectedIndex,
|
|
146
146
|
startAngle: pro ? props.startAngle ?? 0 : startAngle,
|
|
147
|
-
endAngle:
|
|
147
|
+
endAngle:
|
|
148
|
+
props.endAngle ?? startAngle + (semiCircle ? Math.PI : Math.PI * 2),
|
|
148
149
|
setStartAngle,
|
|
149
150
|
total,
|
|
150
151
|
setTotal,
|
package/src/PieChart/main.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const getPieChartMainProps: (props: PieChartMainProps) => {
|
|
|
24
24
|
textColor: string;
|
|
25
25
|
textSize: number;
|
|
26
26
|
tiltAngle: string;
|
|
27
|
-
labelsPosition: "
|
|
27
|
+
labelsPosition: import("../utils/types").LabelsPosition;
|
|
28
28
|
showTextBackground: boolean;
|
|
29
29
|
textBackgroundColor: string;
|
|
30
30
|
showValuesAsLabels: boolean;
|
package/src/PieChart/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native';
|
|
2
2
|
import { type FontStyle } from 'react-native-svg';
|
|
3
|
+
import { LabelsPosition } from '../utils/types';
|
|
3
4
|
export interface PieChartPropsType {
|
|
4
5
|
radius?: number;
|
|
5
6
|
isThreeD?: boolean;
|
|
@@ -31,7 +32,7 @@ export interface PieChartPropsType {
|
|
|
31
32
|
centerLabelComponent?: Function;
|
|
32
33
|
tiltAngle?: string;
|
|
33
34
|
initialAngle?: number;
|
|
34
|
-
labelsPosition?:
|
|
35
|
+
labelsPosition?: LabelsPosition;
|
|
35
36
|
showGradient?: boolean;
|
|
36
37
|
gradientCenterColor?: string;
|
|
37
38
|
onPress?: Function;
|
package/src/PieChart/types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ColorValue } from 'react-native'
|
|
2
2
|
import { type FontStyle } from 'react-native-svg'
|
|
3
|
+
import { LabelsPosition } from '../utils/types'
|
|
3
4
|
|
|
4
5
|
export interface PieChartPropsType {
|
|
5
6
|
radius?: number
|
|
@@ -34,7 +35,7 @@ export interface PieChartPropsType {
|
|
|
34
35
|
centerLabelComponent?: Function
|
|
35
36
|
tiltAngle?: string
|
|
36
37
|
initialAngle?: number
|
|
37
|
-
labelsPosition?:
|
|
38
|
+
labelsPosition?: LabelsPosition
|
|
38
39
|
showGradient?: boolean
|
|
39
40
|
gradientCenterColor?: string
|
|
40
41
|
onPress?: Function
|
package/src/utils/types.d.ts
CHANGED
package/src/utils/types.ts
CHANGED