victory-pie 36.3.0 → 36.4.1
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/dist/victory-pie.js +16367 -16647
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/slice.js +7 -5
- package/es/victory-pie.js +144 -169
- package/lib/helper-methods.js +4 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -4
- package/lib/slice.js +10 -6
- package/lib/victory-pie.js +142 -168
- package/package.json +5 -5
- package/src/helper-methods.js +1 -1
- package/src/index.d.ts +1 -0
- package/src/slice.js +1 -1
- package/src/victory-pie.js +8 -4
package/lib/victory-pie.js
CHANGED
|
@@ -21,13 +21,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
21
21
|
|
|
22
22
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
23
|
|
|
24
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
+
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
|
+
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
33
|
|
|
28
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
35
|
|
|
30
|
-
function
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
|
|
40
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
41
|
|
|
32
42
|
var fallbackProps = {
|
|
33
43
|
endAngle: 360,
|
|
@@ -42,21 +52,21 @@ var fallbackProps = {
|
|
|
42
52
|
labelPosition: "centroid"
|
|
43
53
|
};
|
|
44
54
|
|
|
45
|
-
var VictoryPie =
|
|
46
|
-
/*#__PURE__*/
|
|
47
|
-
function (_React$Component) {
|
|
55
|
+
var VictoryPie = /*#__PURE__*/function (_React$Component) {
|
|
48
56
|
_inherits(VictoryPie, _React$Component);
|
|
49
57
|
|
|
58
|
+
var _super = _createSuper(VictoryPie);
|
|
59
|
+
|
|
50
60
|
function VictoryPie() {
|
|
51
61
|
_classCallCheck(this, VictoryPie);
|
|
52
62
|
|
|
53
|
-
return
|
|
63
|
+
return _super.apply(this, arguments);
|
|
54
64
|
}
|
|
55
65
|
|
|
56
66
|
_createClass(VictoryPie, [{
|
|
57
67
|
key: "shouldAnimate",
|
|
58
|
-
// Overridden in victory-native
|
|
59
|
-
|
|
68
|
+
value: // Overridden in victory-native
|
|
69
|
+
function shouldAnimate() {
|
|
60
70
|
return Boolean(this.props.animate);
|
|
61
71
|
}
|
|
62
72
|
}, {
|
|
@@ -72,179 +82,143 @@ function (_React$Component) {
|
|
|
72
82
|
}
|
|
73
83
|
|
|
74
84
|
var children = this.renderData(props);
|
|
75
|
-
|
|
85
|
+
var component = props.standalone ? this.renderContainer(props.containerComponent, children) : children;
|
|
86
|
+
return _victoryCore.UserProps.withSafeUserProps(component, props);
|
|
76
87
|
}
|
|
77
88
|
}]);
|
|
78
89
|
|
|
79
90
|
return VictoryPie;
|
|
80
91
|
}(_react.default.Component);
|
|
81
92
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
onExit: {
|
|
106
|
-
duration: 500,
|
|
107
|
-
before: function () {
|
|
108
|
-
return {
|
|
109
|
-
_y: 0,
|
|
110
|
-
label: " "
|
|
111
|
-
};
|
|
112
|
-
}
|
|
93
|
+
_defineProperty(VictoryPie, "animationWhitelist", ["data", "endAngle", "height", "innerRadius", "cornerRadius", "padAngle", "padding", "colorScale", "startAngle", "style", "width"]);
|
|
94
|
+
|
|
95
|
+
_defineProperty(VictoryPie, "displayName", "VictoryPie");
|
|
96
|
+
|
|
97
|
+
_defineProperty(VictoryPie, "role", "pie");
|
|
98
|
+
|
|
99
|
+
_defineProperty(VictoryPie, "defaultTransitions", {
|
|
100
|
+
onExit: {
|
|
101
|
+
duration: 500,
|
|
102
|
+
before: function () {
|
|
103
|
+
return {
|
|
104
|
+
_y: 0,
|
|
105
|
+
label: " "
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
onEnter: {
|
|
110
|
+
duration: 500,
|
|
111
|
+
before: function () {
|
|
112
|
+
return {
|
|
113
|
+
_y: 0,
|
|
114
|
+
label: " "
|
|
115
|
+
};
|
|
113
116
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
label: " "
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
after: function (datum) {
|
|
123
|
-
return {
|
|
124
|
-
y_: datum._y,
|
|
125
|
-
label: datum.label
|
|
126
|
-
};
|
|
127
|
-
}
|
|
117
|
+
after: function (datum) {
|
|
118
|
+
return {
|
|
119
|
+
y_: datum._y,
|
|
120
|
+
label: datum.label
|
|
121
|
+
};
|
|
128
122
|
}
|
|
129
123
|
}
|
|
130
124
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
eventKey: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
width: _victoryCore.PropTypes.nonNegative,
|
|
193
|
-
x: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
194
|
-
y: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)])
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
Object.defineProperty(VictoryPie, "defaultProps", {
|
|
198
|
-
configurable: true,
|
|
199
|
-
enumerable: true,
|
|
200
|
-
writable: true,
|
|
201
|
-
value: {
|
|
202
|
-
data: [{
|
|
203
|
-
x: "A",
|
|
204
|
-
y: 1
|
|
205
|
-
}, {
|
|
206
|
-
x: "B",
|
|
207
|
-
y: 2
|
|
208
|
-
}, {
|
|
209
|
-
x: "C",
|
|
210
|
-
y: 3
|
|
211
|
-
}, {
|
|
212
|
-
x: "D",
|
|
213
|
-
y: 1
|
|
214
|
-
}, {
|
|
215
|
-
x: "E",
|
|
216
|
-
y: 2
|
|
217
|
-
}],
|
|
218
|
-
standalone: true,
|
|
219
|
-
dataComponent: _react.default.createElement(_slice.default, null),
|
|
220
|
-
labelComponent: _react.default.createElement(_victoryCore.VictoryLabel, null),
|
|
221
|
-
containerComponent: _react.default.createElement(_victoryCore.VictoryContainer, null),
|
|
222
|
-
groupComponent: _react.default.createElement("g", null),
|
|
223
|
-
sortOrder: "ascending",
|
|
224
|
-
theme: _victoryCore.VictoryTheme.grayscale
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
Object.defineProperty(VictoryPie, "getBaseProps", {
|
|
228
|
-
configurable: true,
|
|
229
|
-
enumerable: true,
|
|
230
|
-
writable: true,
|
|
231
|
-
value: function (props) {
|
|
232
|
-
return (0, _helperMethods.getBaseProps)(props, fallbackProps);
|
|
233
|
-
}
|
|
125
|
+
|
|
126
|
+
_defineProperty(VictoryPie, "propTypes", {
|
|
127
|
+
animate: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.object]),
|
|
128
|
+
colorScale: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.oneOf(["grayscale", "qualitative", "heatmap", "warm", "cool", "red", "green", "blue"])]),
|
|
129
|
+
containerComponent: _propTypes.default.element,
|
|
130
|
+
cornerRadius: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
131
|
+
data: _propTypes.default.array,
|
|
132
|
+
dataComponent: _propTypes.default.element,
|
|
133
|
+
disableInlineStyes: _propTypes.default.bool,
|
|
134
|
+
endAngle: _propTypes.default.number,
|
|
135
|
+
eventKey: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
136
|
+
events: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
137
|
+
target: _propTypes.default.oneOf(["data", "labels", "parent"]),
|
|
138
|
+
eventKey: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
139
|
+
eventHandlers: _propTypes.default.object
|
|
140
|
+
})),
|
|
141
|
+
externalEventMutations: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
142
|
+
callback: _propTypes.default.func,
|
|
143
|
+
childName: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),
|
|
144
|
+
eventKey: _propTypes.default.oneOfType([_propTypes.default.array, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
145
|
+
mutation: _propTypes.default.func,
|
|
146
|
+
target: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array])
|
|
147
|
+
})),
|
|
148
|
+
groupComponent: _propTypes.default.element,
|
|
149
|
+
height: _victoryCore.PropTypes.nonNegative,
|
|
150
|
+
innerRadius: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
151
|
+
labelComponent: _propTypes.default.element,
|
|
152
|
+
labelPlacement: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.oneOf(["parallel", "perpendicular", "vertical"])]),
|
|
153
|
+
labelPosition: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.oneOf(["startAngle", "centroid", "endAngle"])]),
|
|
154
|
+
labelRadius: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
155
|
+
labels: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.array]),
|
|
156
|
+
name: _propTypes.default.string,
|
|
157
|
+
origin: _propTypes.default.shape({
|
|
158
|
+
x: _victoryCore.PropTypes.nonNegative,
|
|
159
|
+
y: _victoryCore.PropTypes.nonNegative
|
|
160
|
+
}),
|
|
161
|
+
padAngle: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
162
|
+
padding: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
163
|
+
top: _propTypes.default.number,
|
|
164
|
+
bottom: _propTypes.default.number,
|
|
165
|
+
left: _propTypes.default.number,
|
|
166
|
+
right: _propTypes.default.number
|
|
167
|
+
})]),
|
|
168
|
+
radius: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]),
|
|
169
|
+
sharedEvents: _propTypes.default.shape({
|
|
170
|
+
events: _propTypes.default.array,
|
|
171
|
+
getEventState: _propTypes.default.func
|
|
172
|
+
}),
|
|
173
|
+
sortKey: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
174
|
+
sortOrder: _propTypes.default.oneOf(["ascending", "descending"]),
|
|
175
|
+
standalone: _propTypes.default.bool,
|
|
176
|
+
startAngle: _propTypes.default.number,
|
|
177
|
+
style: _propTypes.default.shape({
|
|
178
|
+
parent: _propTypes.default.object,
|
|
179
|
+
data: _propTypes.default.object,
|
|
180
|
+
labels: _propTypes.default.object
|
|
181
|
+
}),
|
|
182
|
+
theme: _propTypes.default.object,
|
|
183
|
+
width: _victoryCore.PropTypes.nonNegative,
|
|
184
|
+
x: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
185
|
+
y: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)])
|
|
234
186
|
});
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
187
|
+
|
|
188
|
+
_defineProperty(VictoryPie, "defaultProps", {
|
|
189
|
+
data: [{
|
|
190
|
+
x: "A",
|
|
191
|
+
y: 1
|
|
192
|
+
}, {
|
|
193
|
+
x: "B",
|
|
194
|
+
y: 2
|
|
195
|
+
}, {
|
|
196
|
+
x: "C",
|
|
197
|
+
y: 3
|
|
198
|
+
}, {
|
|
199
|
+
x: "D",
|
|
200
|
+
y: 1
|
|
201
|
+
}, {
|
|
202
|
+
x: "E",
|
|
203
|
+
y: 2
|
|
204
|
+
}],
|
|
205
|
+
standalone: true,
|
|
206
|
+
dataComponent: /*#__PURE__*/_react.default.createElement(_slice.default, null),
|
|
207
|
+
labelComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryLabel, null),
|
|
208
|
+
containerComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryContainer, null),
|
|
209
|
+
groupComponent: /*#__PURE__*/_react.default.createElement("g", null),
|
|
210
|
+
sortOrder: "ascending",
|
|
211
|
+
theme: _victoryCore.VictoryTheme.grayscale
|
|
240
212
|
});
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
writable: true,
|
|
245
|
-
value: ["dataComponent", "labelComponent", "groupComponent", "containerComponent"]
|
|
213
|
+
|
|
214
|
+
_defineProperty(VictoryPie, "getBaseProps", function (props) {
|
|
215
|
+
return (0, _helperMethods.getBaseProps)(props, fallbackProps);
|
|
246
216
|
});
|
|
247
217
|
|
|
218
|
+
_defineProperty(VictoryPie, "getData", _victoryCore.Data.getData);
|
|
219
|
+
|
|
220
|
+
_defineProperty(VictoryPie, "expectedComponents", ["dataComponent", "labelComponent", "groupComponent", "containerComponent"]);
|
|
221
|
+
|
|
248
222
|
var _default = (0, _victoryCore.addEvents)(VictoryPie);
|
|
249
223
|
|
|
250
224
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-pie",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.4.1",
|
|
4
4
|
"description": "Pie Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"author": "Formidable",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"d3-shape": "^1.0.0",
|
|
23
22
|
"lodash": "^4.17.19",
|
|
24
|
-
"prop-types": "^15.
|
|
25
|
-
"victory-core": "^36.
|
|
23
|
+
"prop-types": "^15.8.1",
|
|
24
|
+
"victory-core": "^36.4.1",
|
|
25
|
+
"victory-vendor": "^36.4.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^16.6.0 || ^17.0.0"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "aa44a22e5a93989773a560f765f83ac151f44c46"
|
|
35
35
|
}
|
package/src/helper-methods.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 90, 135, 180, 225, 270, 315, 360] }]*/
|
|
2
2
|
import { assign, defaults, isFunction, isPlainObject, isNil } from "lodash";
|
|
3
|
-
import * as d3Shape from "d3-shape";
|
|
3
|
+
import * as d3Shape from "victory-vendor/d3-shape";
|
|
4
4
|
|
|
5
5
|
import { Helpers, Data, Style } from "victory-core";
|
|
6
6
|
|
package/src/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export interface SliceProps extends VictoryCommonProps {
|
|
|
42
42
|
};
|
|
43
43
|
sliceEndAngle?: SliceNumberOrCallback<SliceProps, "sliceEndAngle">;
|
|
44
44
|
sliceStartAngle?: SliceNumberOrCallback<SliceProps, "sliceStartAngle">;
|
|
45
|
+
style?: VictoryStyleInterface;
|
|
45
46
|
tabIndex?: NumberOrCallback;
|
|
46
47
|
}
|
|
47
48
|
|
package/src/slice.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { Helpers, CommonProps, Path } from "victory-core";
|
|
4
4
|
import { defaults, isFunction, assign } from "lodash";
|
|
5
|
-
import * as d3Shape from "d3-shape";
|
|
5
|
+
import * as d3Shape from "victory-vendor/d3-shape";
|
|
6
6
|
|
|
7
7
|
const getPath = (props) => {
|
|
8
8
|
const { slice, radius, innerRadius, cornerRadius } = props;
|
package/src/victory-pie.js
CHANGED
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
PropTypes as CustomPropTypes,
|
|
9
9
|
VictoryContainer,
|
|
10
10
|
VictoryLabel,
|
|
11
|
-
VictoryTheme
|
|
11
|
+
VictoryTheme,
|
|
12
|
+
UserProps
|
|
12
13
|
} from "victory-core";
|
|
13
14
|
import Slice from "./slice";
|
|
14
15
|
import { getBaseProps } from "./helper-methods";
|
|
@@ -119,7 +120,7 @@ class VictoryPie extends React.Component {
|
|
|
119
120
|
),
|
|
120
121
|
externalEventMutations: PropTypes.arrayOf(
|
|
121
122
|
PropTypes.shape({
|
|
122
|
-
callback: PropTypes.
|
|
123
|
+
callback: PropTypes.func,
|
|
123
124
|
childName: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
124
125
|
eventKey: PropTypes.oneOfType([
|
|
125
126
|
PropTypes.array,
|
|
@@ -129,7 +130,7 @@ class VictoryPie extends React.Component {
|
|
|
129
130
|
]),
|
|
130
131
|
PropTypes.string
|
|
131
132
|
]),
|
|
132
|
-
mutation: PropTypes.
|
|
133
|
+
mutation: PropTypes.func,
|
|
133
134
|
target: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
|
|
134
135
|
})
|
|
135
136
|
),
|
|
@@ -255,9 +256,12 @@ class VictoryPie extends React.Component {
|
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
const children = this.renderData(props);
|
|
258
|
-
|
|
259
|
+
|
|
260
|
+
const component = props.standalone
|
|
259
261
|
? this.renderContainer(props.containerComponent, children)
|
|
260
262
|
: children;
|
|
263
|
+
|
|
264
|
+
return UserProps.withSafeUserProps(component, props);
|
|
261
265
|
}
|
|
262
266
|
}
|
|
263
267
|
|