victory-pie
Advanced tools
Comparing version 33.1.2 to 33.1.4
@@ -158,7 +158,9 @@ import _isNil from "lodash/isNil"; | ||
width = calculatedValues.width, | ||
height = calculatedValues.height, | ||
labelPosition = calculatedValues.labelPosition; | ||
height = calculatedValues.height; | ||
var labelRadius = Helpers.evaluateProp(calculatedValues.labelRadius, _assign({ | ||
text: text | ||
}, dataProps)); | ||
var labelPosition = Helpers.evaluateProp(calculatedValues.labelPosition, _assign({ | ||
text: text | ||
}, dataProps)); | ||
@@ -165,0 +167,0 @@ var labelStyle = _assign({ |
@@ -146,3 +146,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
labelComponent: PropTypes.element, | ||
labelPosition: PropTypes.oneOf(["startAngle", "centroid", "endAngle"]), | ||
labelPosition: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOf(["startAngle", "centroid", "endAngle"])]), | ||
labelRadius: PropTypes.oneOfType([CustomPropTypes.nonNegative, PropTypes.func]), | ||
@@ -149,0 +149,0 @@ labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array]), |
@@ -179,4 +179,3 @@ "use strict"; | ||
width = calculatedValues.width, | ||
height = calculatedValues.height, | ||
labelPosition = calculatedValues.labelPosition; | ||
height = calculatedValues.height; | ||
@@ -187,2 +186,6 @@ var labelRadius = _victoryCore.Helpers.evaluateProp(calculatedValues.labelRadius, (0, _assign2.default)({ | ||
var labelPosition = _victoryCore.Helpers.evaluateProp(calculatedValues.labelPosition, (0, _assign2.default)({ | ||
text: text | ||
}, dataProps)); | ||
var labelStyle = (0, _assign2.default)({ | ||
@@ -189,0 +192,0 @@ padding: 0 |
@@ -160,3 +160,3 @@ "use strict"; | ||
labelComponent: _propTypes.default.element, | ||
labelPosition: _propTypes.default.oneOf(["startAngle", "centroid", "endAngle"]), | ||
labelPosition: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.oneOf(["startAngle", "centroid", "endAngle"])]), | ||
labelRadius: _propTypes.default.oneOfType([_victoryCore.PropTypes.nonNegative, _propTypes.default.func]), | ||
@@ -163,0 +163,0 @@ labels: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.array]), |
{ | ||
"name": "victory-pie", | ||
"version": "33.1.2", | ||
"version": "33.1.4", | ||
"description": "Pie Component for Victory", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -140,3 +140,3 @@ /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 135, 180, 225, 315] }]*/ | ||
const { index, datum, data, slice } = dataProps; | ||
const { style, defaultRadius, origin, width, height, labelPosition } = calculatedValues; | ||
const { style, defaultRadius, origin, width, height } = calculatedValues; | ||
const labelRadius = Helpers.evaluateProp( | ||
@@ -146,2 +146,6 @@ calculatedValues.labelRadius, | ||
); | ||
const labelPosition = Helpers.evaluateProp( | ||
calculatedValues.labelPosition, | ||
assign({ text }, dataProps) | ||
); | ||
const labelStyle = assign({ padding: 0 }, style.labels); | ||
@@ -148,0 +152,0 @@ const evaluatedStyle = Helpers.evaluateStyle( |
@@ -126,3 +126,6 @@ /*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/ | ||
labelComponent: PropTypes.element, | ||
labelPosition: PropTypes.oneOf(["startAngle", "centroid", "endAngle"]), | ||
labelPosition: PropTypes.oneOfType([ | ||
PropTypes.func, | ||
PropTypes.oneOf(["startAngle", "centroid", "endAngle"]) | ||
]), | ||
labelRadius: PropTypes.oneOfType([CustomPropTypes.nonNegative, PropTypes.func]), | ||
@@ -129,0 +132,0 @@ labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array]), |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1300695
24137