gifted-charts-core 0.0.40 → 0.0.42
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 +1 -1
- package/src/PieChart/index.js +1 -1
- package/src/PieChart/index.ts +2 -1
- package/src/PieChart/main.d.ts +1 -1
- package/src/PieChart/types.d.ts +2 -1
- package/src/PieChart/types.ts +2 -1
- package/src/index.d.ts +1 -1
- package/src/index.ts +1 -0
- package/src/utils/types.d.ts +1 -0
- package/src/utils/types.ts +2 -0
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("..").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/index.d.ts
CHANGED
|
@@ -34,4 +34,4 @@ export { getTopAndLeftForStripAndLabel } from './components/common/StripAndLabel
|
|
|
34
34
|
/***********************************************************************************************************************/
|
|
35
35
|
export { getCumulativeWidth, getLighterColor, svgQuadraticCurvePath, svgPath, bezierCommand, getSegmentString, getCurvePathWithSegments, getPreviousSegmentsLastPoint, getPathWithHighlight, getRegionPathObjects, getSegmentedPathObjects, getArrowPoints, getAxesAndRulesProps, getExtendedContainerHeightWithPadding, getSecondaryDataWithOffsetIncluded, getArrowProperty, getAllArrowProperties, maxAndMinUtil, computeMaxAndMinItems, getLabelTextUtil, getXForLineInBar, getYForLineInBar, clone, getLineConfigForBarChart, adjustToOffset } from './utils';
|
|
36
36
|
export { chartTypes, yAxisSides, loc, SEGMENT_START, SEGMENT_END, RANGE_ENTER, RANGE_EXIT, STOP, ruleTypes, AxesAndRulesDefaults, defaultArrowConfig, BarDefaults, defaultLineConfig, LineDefaults, defaultPointerConfig, pieColors, populationDefaults } from './utils/constants';
|
|
37
|
-
export { type RuleType, type RuleTypes, type RulesConfig, type CurveType, type EdgePosition, type PointerEvents, type secondaryYAxisType, type secondaryLineConfigType, type referenceConfigType, type arrowConfigType, type horizSectionPropTypes, type HorizSectionsType, type BarAndLineChartsWrapperTypes, type Pointer, type HighlightedRange, type LineSegment, type LineSvgProps, type LineProperties, type DataSet, type Framework } from './utils/types';
|
|
37
|
+
export { type RuleType, type RuleTypes, type RulesConfig, type CurveType, type EdgePosition, type LabelsPosition, type PointerEvents, type secondaryYAxisType, type secondaryLineConfigType, type referenceConfigType, type arrowConfigType, type horizSectionPropTypes, type HorizSectionsType, type BarAndLineChartsWrapperTypes, type Pointer, type HighlightedRange, type LineSegment, type LineSvgProps, type LineProperties, type DataSet, type Framework } from './utils/types';
|
package/src/index.ts
CHANGED
package/src/utils/types.d.ts
CHANGED
package/src/utils/types.ts
CHANGED