Comparing version 0.0.143 to 0.0.144
@@ -16,2 +16,11 @@ 'use strict'; | ||
var _Pie = require('./shapes/Pie'); | ||
Object.defineProperty(exports, 'Pie', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_Pie).default; | ||
} | ||
}); | ||
var _Line = require('./shapes/Line'); | ||
@@ -18,0 +27,0 @@ |
@@ -19,4 +19,2 @@ 'use strict'; | ||
var _group = require('@vx/group'); | ||
var _d3Shape = require('d3-shape'); | ||
@@ -33,50 +31,27 @@ | ||
function Arc(_ref) { | ||
var _ref$className = _ref.className, | ||
className = _ref$className === undefined ? '' : _ref$className, | ||
_ref$top = _ref.top, | ||
top = _ref$top === undefined ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === undefined ? 0 : _ref$left, | ||
var className = _ref.className, | ||
data = _ref.data, | ||
centroid = _ref.centroid, | ||
_ref$innerRadius = _ref.innerRadius, | ||
innerRadius = _ref$innerRadius === undefined ? 0 : _ref$innerRadius, | ||
innerRadius = _ref.innerRadius, | ||
outerRadius = _ref.outerRadius, | ||
cornerRadius = _ref.cornerRadius, | ||
_ref$startAngle = _ref.startAngle, | ||
startAngle = _ref$startAngle === undefined ? 0 : _ref$startAngle, | ||
startAngle = _ref.startAngle, | ||
endAngle = _ref.endAngle, | ||
padAngle = _ref.padAngle, | ||
padRadius = _ref.padRadius, | ||
pieSort = _ref.pieSort, | ||
pieValue = _ref.pieValue, | ||
restProps = _objectWithoutProperties(_ref, ['className', 'top', 'left', 'data', 'centroid', 'innerRadius', 'outerRadius', 'cornerRadius', 'startAngle', 'endAngle', 'padAngle', 'padRadius', 'pieSort', 'pieValue']); | ||
restProps = _objectWithoutProperties(_ref, ['className', 'data', 'centroid', 'innerRadius', 'outerRadius', 'cornerRadius', 'startAngle', 'endAngle', 'padAngle', 'padRadius']); | ||
var path = (0, _d3Shape.arc)(); | ||
path.innerRadius(innerRadius); | ||
if (outerRadius) path.outerRadius(outerRadius); | ||
if (cornerRadius) path.cornerRadius(cornerRadius); | ||
if (padRadius) path.padRadius(padRadius); | ||
var pie = (0, _d3Shape.pie)(); | ||
if (pieSort) pie.sort(pieSort); | ||
if (pieValue) pie.value(pieValue); | ||
if (padAngle) pie.padAngle(padAngle); | ||
var arcs = pie(data); | ||
return _react2.default.createElement( | ||
_group.Group, | ||
{ className: 'vx-arcs-group', top: top, left: left }, | ||
arcs.map(function (arc, i) { | ||
var c = void 0; | ||
if (centroid) c = path.centroid(arc); | ||
return _react2.default.createElement( | ||
'g', | ||
{ key: 'arc-' + i }, | ||
_react2.default.createElement('path', _extends({ | ||
className: (0, _classnames2.default)('vx-arc', className), | ||
d: path(arc) | ||
}, (0, _additionalProps2.default)(restProps, _extends({}, arc, { index: i, centroid: c })))), | ||
centroid && centroid(c, arc) | ||
); | ||
}) | ||
); | ||
var arc = (0, _d3Shape.arc)(); | ||
if (centroid) arc.centroid(centroid); | ||
if (innerRadius) arc.innerRadius(innerRadius); | ||
if (outerRadius) arc.outerRadius(outerRadius); | ||
if (cornerRadius) arc.cornerRadius(cornerRadius); | ||
if (startAngle) arc.startAngle(startAngle); | ||
if (endAngle) arc.endAngle(endAngle); | ||
if (padAngle) arc.padAngle(padAngle); | ||
if (padRadius) arc.padRadius(padRadius); | ||
return _react2.default.createElement('path', _extends({ | ||
className: (0, _classnames2.default)('vx-arc', className), | ||
d: arc(data) | ||
}, (0, _additionalProps2.default)(restProps, data))); | ||
} |
{ | ||
"name": "@vx/shape", | ||
"version": "0.0.143", | ||
"version": "0.0.144", | ||
"description": "vx shape", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
59384
22
1044