react-native-gifted-charts 1.0.17 → 1.0.18
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/BarChart/RenderBars.tsx +3 -1
- package/src/PieChart/index.tsx +3 -1
- package/src/todos.md +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-gifted-charts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "The most complete library for Bar, Line, Area, Pie, Donut and Stacked Bar charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"files": [
|
|
@@ -111,7 +111,9 @@ const RenderBars = (props: Props) => {
|
|
|
111
111
|
} = props;
|
|
112
112
|
|
|
113
113
|
const barMarginBottom =
|
|
114
|
-
item.barMarginBottom === 0
|
|
114
|
+
item.barMarginBottom === 0
|
|
115
|
+
? 0
|
|
116
|
+
: item.barMarginBottom || props.barMarginBottom || 0;
|
|
115
117
|
|
|
116
118
|
const renderLabel = (label: String, labelTextStyle: any, value: number) => {
|
|
117
119
|
return (
|
package/src/PieChart/index.tsx
CHANGED
|
@@ -34,6 +34,7 @@ type propTypes = {
|
|
|
34
34
|
|
|
35
35
|
centerLabelComponent?: Function;
|
|
36
36
|
tilt?: number;
|
|
37
|
+
initialAngle?: number;
|
|
37
38
|
};
|
|
38
39
|
type itemType = {
|
|
39
40
|
value: number;
|
|
@@ -96,6 +97,7 @@ export const PieChart = (props: propTypes) => {
|
|
|
96
97
|
'800',
|
|
97
98
|
'900',
|
|
98
99
|
];
|
|
100
|
+
const initialAngle = props.initialAngle || 0;
|
|
99
101
|
|
|
100
102
|
let isDataShifted = false;
|
|
101
103
|
data.forEach((item: any) => {
|
|
@@ -148,7 +150,7 @@ export const PieChart = (props: propTypes) => {
|
|
|
148
150
|
/******************************************************/
|
|
149
151
|
|
|
150
152
|
let i = 0,
|
|
151
|
-
angleSum =
|
|
153
|
+
angleSum = initialAngle;
|
|
152
154
|
let colors = [
|
|
153
155
|
'cyan',
|
|
154
156
|
'green',
|
package/src/todos.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
## Feature requests
|
|
2
2
|
|
|
3
3
|
1. OnPress function on Pie Chart https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/111
|
|
4
|
-
2.
|
|
4
|
+
2. Change startingPoint default props on PieChart https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/132
|
|
5
5
|
|
|
6
6
|
## To-dos in documentation-
|
|
7
7
|
|
|
@@ -10,4 +10,5 @@
|
|
|
10
10
|
3. Prepare a doc for Bar chart with y axis on right side
|
|
11
11
|
4. Prepare a doc for Line chart with y axis on right side
|
|
12
12
|
5. Prepare a doc for Bar chart combined with Line chart having a separate data for the Line chart
|
|
13
|
-
6. Prepare a doc for Line chart with smoothly scrolling data pointer and strip
|
|
13
|
+
6. Prepare a doc for Line chart with smoothly scrolling data pointer and strip (along with pointerShiftX)
|
|
14
|
+
7. Prepare a doc for Bar chart with barMarginBottom
|