@visx/grid
Advanced tools
Comparing version 2.12.2 to 2.17.0-alpha.0
import _pt from "prop-types"; | ||
var _excluded = ["top", "left", "xScale", "yScale", "width", "height", "className", "stroke", "strokeWidth", "strokeDasharray", "numTicksRows", "numTicksColumns", "rowLineStyle", "columnLineStyle", "xOffset", "yOffset", "rowTickValues", "columnTickValues"]; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from 'react'; | ||
@@ -15,21 +12,20 @@ import cx from 'classnames'; | ||
var top = _ref.top, | ||
left = _ref.left, | ||
xScale = _ref.xScale, | ||
yScale = _ref.yScale, | ||
width = _ref.width, | ||
height = _ref.height, | ||
className = _ref.className, | ||
stroke = _ref.stroke, | ||
strokeWidth = _ref.strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
numTicksRows = _ref.numTicksRows, | ||
numTicksColumns = _ref.numTicksColumns, | ||
rowLineStyle = _ref.rowLineStyle, | ||
columnLineStyle = _ref.columnLineStyle, | ||
xOffset = _ref.xOffset, | ||
yOffset = _ref.yOffset, | ||
rowTickValues = _ref.rowTickValues, | ||
columnTickValues = _ref.columnTickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
left = _ref.left, | ||
xScale = _ref.xScale, | ||
yScale = _ref.yScale, | ||
width = _ref.width, | ||
height = _ref.height, | ||
className = _ref.className, | ||
stroke = _ref.stroke, | ||
strokeWidth = _ref.strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
numTicksRows = _ref.numTicksRows, | ||
numTicksColumns = _ref.numTicksColumns, | ||
rowLineStyle = _ref.rowLineStyle, | ||
columnLineStyle = _ref.columnLineStyle, | ||
xOffset = _ref.xOffset, | ||
yOffset = _ref.yOffset, | ||
rowTickValues = _ref.rowTickValues, | ||
columnTickValues = _ref.columnTickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
return /*#__PURE__*/React.createElement(Group, { | ||
@@ -36,0 +32,0 @@ className: cx('visx-grid', className), |
import _pt from "prop-types"; | ||
var _excluded = ["className", "innerRadius", "left", "lineClassName", "lineStyle", "numTicks", "outerRadius", "scale", "stroke", "strokeDasharray", "strokeWidth", "tickValues", "top"]; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from 'react'; | ||
@@ -17,23 +14,22 @@ import cx from 'classnames'; | ||
var className = _ref.className, | ||
_ref$innerRadius = _ref.innerRadius, | ||
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
_ref$outerRadius = _ref.outerRadius, | ||
outerRadius = _ref$outerRadius === void 0 ? 0 : _ref$outerRadius, | ||
scale = _ref.scale, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
strokeDasharray = _ref.strokeDasharray, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
_ref$innerRadius = _ref.innerRadius, | ||
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
_ref$outerRadius = _ref.outerRadius, | ||
outerRadius = _ref$outerRadius === void 0 ? 0 : _ref$outerRadius, | ||
scale = _ref.scale, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
strokeDasharray = _ref.strokeDasharray, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var ticks = tickValues != null ? tickValues : getTicks(scale, numTicks); | ||
@@ -46,3 +42,2 @@ return /*#__PURE__*/React.createElement(Group, { | ||
var _coerceNumber; | ||
var angle = ((_coerceNumber = coerceNumber(scale(tick))) != null ? _coerceNumber : Math.PI / 2) - Math.PI / 2; | ||
@@ -49,0 +44,0 @@ return /*#__PURE__*/React.createElement(Line, _extends({ |
import _pt from "prop-types"; | ||
var _excluded = ["top", "left", "scale", "height", "stroke", "strokeWidth", "strokeDasharray", "className", "numTicks", "lineStyle", "offset", "tickValues", "children"]; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from 'react'; | ||
@@ -17,21 +14,20 @@ import cx from 'classnames'; | ||
var _ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
height = _ref.height, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
children = _ref.children, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
height = _ref.height, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
children = _ref.children, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var ticks = tickValues != null ? tickValues : getTicks(scale, numTicks); | ||
@@ -41,3 +37,2 @@ var scaleOffset = (offset != null ? offset : 0) + getScaleBandwidth(scale) / 2; | ||
var _coerceNumber; | ||
var x = ((_coerceNumber = coerceNumber(scale(d))) != null ? _coerceNumber : 0) + scaleOffset; | ||
@@ -64,4 +59,4 @@ return { | ||
var from = _ref2.from, | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
return /*#__PURE__*/React.createElement(Line, _extends({ | ||
@@ -68,0 +63,0 @@ key: "column-line-" + index, |
@@ -9,28 +9,28 @@ import _pt from "prop-types"; | ||
var arcThickness = _ref.arcThickness, | ||
className = _ref.className, | ||
classNameAngle = _ref.classNameAngle, | ||
classNameRadial = _ref.classNameRadial, | ||
endAngle = _ref.endAngle, | ||
fillRadial = _ref.fillRadial, | ||
innerRadius = _ref.innerRadius, | ||
left = _ref.left, | ||
lineClassNameAngle = _ref.lineClassNameAngle, | ||
lineClassNameRadial = _ref.lineClassNameRadial, | ||
lineStyleAngle = _ref.lineStyleAngle, | ||
lineStyleRadial = _ref.lineStyleRadial, | ||
numTicksAngle = _ref.numTicksAngle, | ||
numTicksRadial = _ref.numTicksRadial, | ||
outerRadius = _ref.outerRadius, | ||
scaleAngle = _ref.scaleAngle, | ||
scaleRadial = _ref.scaleRadial, | ||
startAngle = _ref.startAngle, | ||
strokeAngle = _ref.strokeAngle, | ||
strokeRadial = _ref.strokeRadial, | ||
strokeWidthAngle = _ref.strokeWidthAngle, | ||
strokeWidthRadial = _ref.strokeWidthRadial, | ||
strokeDasharrayAngle = _ref.strokeDasharrayAngle, | ||
strokeDasharrayRadial = _ref.strokeDasharrayRadial, | ||
tickValuesAngle = _ref.tickValuesAngle, | ||
tickValuesRadial = _ref.tickValuesRadial, | ||
top = _ref.top; | ||
className = _ref.className, | ||
classNameAngle = _ref.classNameAngle, | ||
classNameRadial = _ref.classNameRadial, | ||
endAngle = _ref.endAngle, | ||
fillRadial = _ref.fillRadial, | ||
innerRadius = _ref.innerRadius, | ||
left = _ref.left, | ||
lineClassNameAngle = _ref.lineClassNameAngle, | ||
lineClassNameRadial = _ref.lineClassNameRadial, | ||
lineStyleAngle = _ref.lineStyleAngle, | ||
lineStyleRadial = _ref.lineStyleRadial, | ||
numTicksAngle = _ref.numTicksAngle, | ||
numTicksRadial = _ref.numTicksRadial, | ||
outerRadius = _ref.outerRadius, | ||
scaleAngle = _ref.scaleAngle, | ||
scaleRadial = _ref.scaleRadial, | ||
startAngle = _ref.startAngle, | ||
strokeAngle = _ref.strokeAngle, | ||
strokeRadial = _ref.strokeRadial, | ||
strokeWidthAngle = _ref.strokeWidthAngle, | ||
strokeWidthRadial = _ref.strokeWidthRadial, | ||
strokeDasharrayAngle = _ref.strokeDasharrayAngle, | ||
strokeDasharrayRadial = _ref.strokeDasharrayRadial, | ||
tickValuesAngle = _ref.tickValuesAngle, | ||
tickValuesRadial = _ref.tickValuesRadial, | ||
top = _ref.top; | ||
return /*#__PURE__*/React.createElement(Group, { | ||
@@ -37,0 +37,0 @@ className: cx('visx-grid-polar', className), |
import _pt from "prop-types"; | ||
var _excluded = ["arcThickness", "className", "endAngle", "fill", "fillOpacity", "left", "lineClassName", "lineStyle", "numTicks", "scale", "startAngle", "stroke", "strokeWidth", "strokeDasharray", "tickValues", "top"]; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from 'react'; | ||
@@ -15,28 +12,27 @@ import cx from 'classnames'; | ||
var arcThickness = _ref.arcThickness, | ||
className = _ref.className, | ||
_ref$endAngle = _ref.endAngle, | ||
endAngle = _ref$endAngle === void 0 ? 2 * Math.PI : _ref$endAngle, | ||
_ref$fill = _ref.fill, | ||
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill, | ||
_ref$fillOpacity = _ref.fillOpacity, | ||
fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
scale = _ref.scale, | ||
_ref$startAngle = _ref.startAngle, | ||
startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
className = _ref.className, | ||
_ref$endAngle = _ref.endAngle, | ||
endAngle = _ref$endAngle === void 0 ? 2 * Math.PI : _ref$endAngle, | ||
_ref$fill = _ref.fill, | ||
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill, | ||
_ref$fillOpacity = _ref.fillOpacity, | ||
fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
scale = _ref.scale, | ||
_ref$startAngle = _ref.startAngle, | ||
startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var radii = tickValues != null ? tickValues : getTicks(scale, numTicks); | ||
@@ -43,0 +39,0 @@ var innerRadius = Math.min.apply(Math, scale.domain()); |
import _pt from "prop-types"; | ||
var _excluded = ["top", "left", "scale", "width", "stroke", "strokeWidth", "strokeDasharray", "className", "children", "numTicks", "lineStyle", "offset", "tickValues"]; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import React from 'react'; | ||
@@ -17,21 +14,20 @@ import cx from 'classnames'; | ||
var _ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
width = _ref.width, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
children = _ref.children, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
width = _ref.width, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
children = _ref.children, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var ticks = tickValues != null ? tickValues : getTicks(scale, numTicks); | ||
@@ -41,3 +37,2 @@ var scaleOffset = (offset != null ? offset : 0) + getScaleBandwidth(scale) / 2; | ||
var _coerceNumber; | ||
var y = ((_coerceNumber = coerceNumber(scale(d))) != null ? _coerceNumber : 0) + scaleOffset; | ||
@@ -64,4 +59,4 @@ return { | ||
var from = _ref2.from, | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
return /*#__PURE__*/React.createElement(Line, _extends({ | ||
@@ -68,0 +63,0 @@ key: "row-line-" + index, |
@@ -1,1 +0,1 @@ | ||
import React from 'react'; | ||
export {}; |
export default function polarToCartesian(_ref) { | ||
var radius = _ref.radius, | ||
angle = _ref.angle; | ||
angle = _ref.angle; | ||
return { | ||
@@ -5,0 +5,0 @@ x: radius * Math.cos(angle), |
@@ -5,44 +5,32 @@ "use strict"; | ||
exports.default = Grid; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _group = require("@visx/group"); | ||
var _GridRows = _interopRequireDefault(require("./GridRows")); | ||
var _GridColumns = _interopRequireDefault(require("./GridColumns")); | ||
var _excluded = ["top", "left", "xScale", "yScale", "width", "height", "className", "stroke", "strokeWidth", "strokeDasharray", "numTicksRows", "numTicksColumns", "rowLineStyle", "columnLineStyle", "xOffset", "yOffset", "rowTickValues", "columnTickValues"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function Grid(_ref) { | ||
var top = _ref.top, | ||
left = _ref.left, | ||
xScale = _ref.xScale, | ||
yScale = _ref.yScale, | ||
width = _ref.width, | ||
height = _ref.height, | ||
className = _ref.className, | ||
stroke = _ref.stroke, | ||
strokeWidth = _ref.strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
numTicksRows = _ref.numTicksRows, | ||
numTicksColumns = _ref.numTicksColumns, | ||
rowLineStyle = _ref.rowLineStyle, | ||
columnLineStyle = _ref.columnLineStyle, | ||
xOffset = _ref.xOffset, | ||
yOffset = _ref.yOffset, | ||
rowTickValues = _ref.rowTickValues, | ||
columnTickValues = _ref.columnTickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
left = _ref.left, | ||
xScale = _ref.xScale, | ||
yScale = _ref.yScale, | ||
width = _ref.width, | ||
height = _ref.height, | ||
className = _ref.className, | ||
stroke = _ref.stroke, | ||
strokeWidth = _ref.strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
numTicksRows = _ref.numTicksRows, | ||
numTicksColumns = _ref.numTicksColumns, | ||
rowLineStyle = _ref.rowLineStyle, | ||
columnLineStyle = _ref.columnLineStyle, | ||
xOffset = _ref.xOffset, | ||
yOffset = _ref.yOffset, | ||
rowTickValues = _ref.rowTickValues, | ||
columnTickValues = _ref.columnTickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
return /*#__PURE__*/_react.default.createElement(_group.Group, { | ||
@@ -76,3 +64,2 @@ className: (0, _classnames.default)('visx-grid', className), | ||
} | ||
Grid.propTypes = { | ||
@@ -79,0 +66,0 @@ rowTickValues: _propTypes.default.array, |
@@ -5,50 +5,36 @@ "use strict"; | ||
exports.default = GridAngle; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _Line = _interopRequireDefault(require("@visx/shape/lib/shapes/Line")); | ||
var _group = require("@visx/group"); | ||
var _scale = require("@visx/scale"); | ||
var _point = require("@visx/point"); | ||
var _polarToCartesian = _interopRequireDefault(require("../utils/polarToCartesian")); | ||
var _excluded = ["className", "innerRadius", "left", "lineClassName", "lineStyle", "numTicks", "outerRadius", "scale", "stroke", "strokeDasharray", "strokeWidth", "tickValues", "top"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function GridAngle(_ref) { | ||
var className = _ref.className, | ||
_ref$innerRadius = _ref.innerRadius, | ||
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
_ref$outerRadius = _ref.outerRadius, | ||
outerRadius = _ref$outerRadius === void 0 ? 0 : _ref$outerRadius, | ||
scale = _ref.scale, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
strokeDasharray = _ref.strokeDasharray, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
_ref$innerRadius = _ref.innerRadius, | ||
innerRadius = _ref$innerRadius === void 0 ? 0 : _ref$innerRadius, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
_ref$outerRadius = _ref.outerRadius, | ||
outerRadius = _ref$outerRadius === void 0 ? 0 : _ref$outerRadius, | ||
scale = _ref.scale, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
strokeDasharray = _ref.strokeDasharray, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var ticks = tickValues != null ? tickValues : (0, _scale.getTicks)(scale, numTicks); | ||
@@ -61,3 +47,2 @@ return /*#__PURE__*/_react.default.createElement(_group.Group, { | ||
var _coerceNumber; | ||
var angle = ((_coerceNumber = (0, _scale.coerceNumber)(scale(tick))) != null ? _coerceNumber : Math.PI / 2) - Math.PI / 2; | ||
@@ -82,3 +67,2 @@ return /*#__PURE__*/_react.default.createElement(_Line.default, _extends({ | ||
} | ||
GridAngle.propTypes = { | ||
@@ -85,0 +69,0 @@ tickValues: _propTypes.default.array, |
@@ -5,48 +5,34 @@ "use strict"; | ||
exports.default = GridColumns; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _Line = _interopRequireDefault(require("@visx/shape/lib/shapes/Line")); | ||
var _group = require("@visx/group"); | ||
var _point = require("@visx/point"); | ||
var _scale = require("@visx/scale"); | ||
var _getScaleBandwidth = _interopRequireDefault(require("../utils/getScaleBandwidth")); | ||
var _excluded = ["top", "left", "scale", "height", "stroke", "strokeWidth", "strokeDasharray", "className", "numTicks", "lineStyle", "offset", "tickValues", "children"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function GridColumns(_ref) { | ||
var _ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
height = _ref.height, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
children = _ref.children, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
height = _ref.height, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
children = _ref.children, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var ticks = tickValues != null ? tickValues : (0, _scale.getTicks)(scale, numTicks); | ||
@@ -56,3 +42,2 @@ var scaleOffset = (offset != null ? offset : 0) + (0, _getScaleBandwidth.default)(scale) / 2; | ||
var _coerceNumber; | ||
var x = ((_coerceNumber = (0, _scale.coerceNumber)(scale(d))) != null ? _coerceNumber : 0) + scaleOffset; | ||
@@ -79,4 +64,4 @@ return { | ||
var from = _ref2.from, | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
return /*#__PURE__*/_react.default.createElement(_Line.default, _extends({ | ||
@@ -93,3 +78,2 @@ key: "column-line-" + index, | ||
} | ||
GridColumns.propTypes = { | ||
@@ -96,0 +80,0 @@ tickValues: _propTypes.default.array, |
@@ -5,45 +5,37 @@ "use strict"; | ||
exports.default = GridPolar; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _group = require("@visx/group"); | ||
var _GridAngle = _interopRequireDefault(require("./GridAngle")); | ||
var _GridRadial = _interopRequireDefault(require("./GridRadial")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function GridPolar(_ref) { | ||
var arcThickness = _ref.arcThickness, | ||
className = _ref.className, | ||
classNameAngle = _ref.classNameAngle, | ||
classNameRadial = _ref.classNameRadial, | ||
endAngle = _ref.endAngle, | ||
fillRadial = _ref.fillRadial, | ||
innerRadius = _ref.innerRadius, | ||
left = _ref.left, | ||
lineClassNameAngle = _ref.lineClassNameAngle, | ||
lineClassNameRadial = _ref.lineClassNameRadial, | ||
lineStyleAngle = _ref.lineStyleAngle, | ||
lineStyleRadial = _ref.lineStyleRadial, | ||
numTicksAngle = _ref.numTicksAngle, | ||
numTicksRadial = _ref.numTicksRadial, | ||
outerRadius = _ref.outerRadius, | ||
scaleAngle = _ref.scaleAngle, | ||
scaleRadial = _ref.scaleRadial, | ||
startAngle = _ref.startAngle, | ||
strokeAngle = _ref.strokeAngle, | ||
strokeRadial = _ref.strokeRadial, | ||
strokeWidthAngle = _ref.strokeWidthAngle, | ||
strokeWidthRadial = _ref.strokeWidthRadial, | ||
strokeDasharrayAngle = _ref.strokeDasharrayAngle, | ||
strokeDasharrayRadial = _ref.strokeDasharrayRadial, | ||
tickValuesAngle = _ref.tickValuesAngle, | ||
tickValuesRadial = _ref.tickValuesRadial, | ||
top = _ref.top; | ||
className = _ref.className, | ||
classNameAngle = _ref.classNameAngle, | ||
classNameRadial = _ref.classNameRadial, | ||
endAngle = _ref.endAngle, | ||
fillRadial = _ref.fillRadial, | ||
innerRadius = _ref.innerRadius, | ||
left = _ref.left, | ||
lineClassNameAngle = _ref.lineClassNameAngle, | ||
lineClassNameRadial = _ref.lineClassNameRadial, | ||
lineStyleAngle = _ref.lineStyleAngle, | ||
lineStyleRadial = _ref.lineStyleRadial, | ||
numTicksAngle = _ref.numTicksAngle, | ||
numTicksRadial = _ref.numTicksRadial, | ||
outerRadius = _ref.outerRadius, | ||
scaleAngle = _ref.scaleAngle, | ||
scaleRadial = _ref.scaleRadial, | ||
startAngle = _ref.startAngle, | ||
strokeAngle = _ref.strokeAngle, | ||
strokeRadial = _ref.strokeRadial, | ||
strokeWidthAngle = _ref.strokeWidthAngle, | ||
strokeWidthRadial = _ref.strokeWidthRadial, | ||
strokeDasharrayAngle = _ref.strokeDasharrayAngle, | ||
strokeDasharrayRadial = _ref.strokeDasharrayRadial, | ||
tickValuesAngle = _ref.tickValuesAngle, | ||
tickValuesRadial = _ref.tickValuesRadial, | ||
top = _ref.top; | ||
return /*#__PURE__*/_react.default.createElement(_group.Group, { | ||
@@ -81,3 +73,2 @@ className: (0, _classnames.default)('visx-grid-polar', className), | ||
} | ||
GridPolar.propTypes = { | ||
@@ -84,0 +75,0 @@ arcThickness: _propTypes.default.number, |
@@ -5,51 +5,39 @@ "use strict"; | ||
exports.default = GridRadial; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _Arc = _interopRequireDefault(require("@visx/shape/lib/shapes/Arc")); | ||
var _group = require("@visx/group"); | ||
var _scale = require("@visx/scale"); | ||
var _excluded = ["arcThickness", "className", "endAngle", "fill", "fillOpacity", "left", "lineClassName", "lineStyle", "numTicks", "scale", "startAngle", "stroke", "strokeWidth", "strokeDasharray", "tickValues", "top"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function GridRadial(_ref) { | ||
var arcThickness = _ref.arcThickness, | ||
className = _ref.className, | ||
_ref$endAngle = _ref.endAngle, | ||
endAngle = _ref$endAngle === void 0 ? 2 * Math.PI : _ref$endAngle, | ||
_ref$fill = _ref.fill, | ||
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill, | ||
_ref$fillOpacity = _ref.fillOpacity, | ||
fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
scale = _ref.scale, | ||
_ref$startAngle = _ref.startAngle, | ||
startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
className = _ref.className, | ||
_ref$endAngle = _ref.endAngle, | ||
endAngle = _ref$endAngle === void 0 ? 2 * Math.PI : _ref$endAngle, | ||
_ref$fill = _ref.fill, | ||
fill = _ref$fill === void 0 ? 'transparent' : _ref$fill, | ||
_ref$fillOpacity = _ref.fillOpacity, | ||
fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
lineClassName = _ref.lineClassName, | ||
lineStyle = _ref.lineStyle, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
scale = _ref.scale, | ||
_ref$startAngle = _ref.startAngle, | ||
startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
tickValues = _ref.tickValues, | ||
_ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var radii = tickValues != null ? tickValues : (0, _scale.getTicks)(scale, numTicks); | ||
@@ -78,3 +66,2 @@ var innerRadius = Math.min.apply(Math, scale.domain()); | ||
} | ||
GridRadial.propTypes = { | ||
@@ -81,0 +68,0 @@ tickValues: _propTypes.default.array, |
@@ -5,48 +5,34 @@ "use strict"; | ||
exports.default = GridRows; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _Line = _interopRequireDefault(require("@visx/shape/lib/shapes/Line")); | ||
var _group = require("@visx/group"); | ||
var _point = require("@visx/point"); | ||
var _scale = require("@visx/scale"); | ||
var _getScaleBandwidth = _interopRequireDefault(require("../utils/getScaleBandwidth")); | ||
var _excluded = ["top", "left", "scale", "width", "stroke", "strokeWidth", "strokeDasharray", "className", "children", "numTicks", "lineStyle", "offset", "tickValues"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
function GridRows(_ref) { | ||
var _ref$top = _ref.top, | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
width = _ref.width, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
children = _ref.children, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
top = _ref$top === void 0 ? 0 : _ref$top, | ||
_ref$left = _ref.left, | ||
left = _ref$left === void 0 ? 0 : _ref$left, | ||
scale = _ref.scale, | ||
width = _ref.width, | ||
_ref$stroke = _ref.stroke, | ||
stroke = _ref$stroke === void 0 ? '#eaf0f6' : _ref$stroke, | ||
_ref$strokeWidth = _ref.strokeWidth, | ||
strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth, | ||
strokeDasharray = _ref.strokeDasharray, | ||
className = _ref.className, | ||
children = _ref.children, | ||
_ref$numTicks = _ref.numTicks, | ||
numTicks = _ref$numTicks === void 0 ? 10 : _ref$numTicks, | ||
lineStyle = _ref.lineStyle, | ||
offset = _ref.offset, | ||
tickValues = _ref.tickValues, | ||
restProps = _objectWithoutPropertiesLoose(_ref, _excluded); | ||
var ticks = tickValues != null ? tickValues : (0, _scale.getTicks)(scale, numTicks); | ||
@@ -56,3 +42,2 @@ var scaleOffset = (offset != null ? offset : 0) + (0, _getScaleBandwidth.default)(scale) / 2; | ||
var _coerceNumber; | ||
var y = ((_coerceNumber = (0, _scale.coerceNumber)(scale(d))) != null ? _coerceNumber : 0) + scaleOffset; | ||
@@ -79,4 +64,4 @@ return { | ||
var from = _ref2.from, | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
to = _ref2.to, | ||
index = _ref2.index; | ||
return /*#__PURE__*/_react.default.createElement(_Line.default, _extends({ | ||
@@ -93,3 +78,2 @@ key: "row-line-" + index, | ||
} | ||
GridRows.propTypes = { | ||
@@ -96,0 +80,0 @@ tickValues: _propTypes.default.array, |
"use strict"; | ||
exports.__esModule = true; | ||
exports.GridPolar = exports.GridRadial = exports.GridAngle = exports.Grid = exports.GridColumns = exports.GridRows = void 0; | ||
exports.GridRows = exports.GridRadial = exports.GridPolar = exports.GridColumns = exports.GridAngle = exports.Grid = void 0; | ||
var _GridRows = _interopRequireDefault(require("./grids/GridRows")); | ||
exports.GridRows = _GridRows.default; | ||
var _GridColumns = _interopRequireDefault(require("./grids/GridColumns")); | ||
exports.GridColumns = _GridColumns.default; | ||
var _Grid = _interopRequireDefault(require("./grids/Grid")); | ||
exports.Grid = _Grid.default; | ||
var _GridAngle = _interopRequireDefault(require("./grids/GridAngle")); | ||
exports.GridAngle = _GridAngle.default; | ||
var _GridRadial = _interopRequireDefault(require("./grids/GridRadial")); | ||
exports.GridRadial = _GridRadial.default; | ||
var _GridPolar = _interopRequireDefault(require("./grids/GridPolar")); | ||
exports.GridPolar = _GridPolar.default; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -1,2 +0,2 @@ | ||
import { CSSProperties } from 'react'; | ||
import { CSSProperties, ReactNode } from 'react'; | ||
import { D3Scale, NumberLike } from '@visx/scale'; | ||
@@ -23,3 +23,3 @@ export declare type GridScaleOutput = number | NumberLike | undefined; | ||
lines: GridLines; | ||
}) => React.ReactNode; | ||
}) => ReactNode; | ||
/** Top offset to apply to glyph g element container. */ | ||
@@ -26,0 +26,0 @@ top?: number; |
"use strict"; | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.__esModule = true; |
@@ -5,5 +5,4 @@ "use strict"; | ||
exports.default = getScaleBandwidth; | ||
function getScaleBandwidth(scale) { | ||
return 'bandwidth' in scale ? scale.bandwidth() : 0; | ||
} |
@@ -5,6 +5,5 @@ "use strict"; | ||
exports.default = polarToCartesian; | ||
function polarToCartesian(_ref) { | ||
var radius = _ref.radius, | ||
angle = _ref.angle; | ||
angle = _ref.angle; | ||
return { | ||
@@ -11,0 +10,0 @@ x: radius * Math.cos(angle), |
{ | ||
"name": "@visx/grid", | ||
"version": "2.12.2", | ||
"version": "2.17.0-alpha.0", | ||
"description": "visx grid", | ||
@@ -35,7 +35,7 @@ "sideEffects": false, | ||
"@types/react": "*", | ||
"@visx/curve": "2.1.0", | ||
"@visx/group": "2.10.0", | ||
"@visx/point": "2.6.0", | ||
"@visx/scale": "2.2.2", | ||
"@visx/shape": "2.12.2", | ||
"@visx/curve": "2.17.0-alpha.0", | ||
"@visx/group": "2.17.0-alpha.0", | ||
"@visx/point": "2.17.0-alpha.0", | ||
"@visx/scale": "2.17.0-alpha.0", | ||
"@visx/shape": "2.17.0-alpha.0", | ||
"classnames": "^2.3.1", | ||
@@ -47,3 +47,3 @@ "prop-types": "^15.6.2" | ||
}, | ||
"gitHead": "023354adb0db32840302ebd948181365fead687e" | ||
"gitHead": "77292e262dfe082b554b64839eb3ee141439a95f" | ||
} |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
68411
1244
1
+ Added@visx/curve@2.17.0-alpha.0(transitive)
+ Added@visx/group@2.17.0-alpha.0(transitive)
+ Added@visx/point@2.17.0-alpha.0(transitive)
+ Added@visx/scale@2.17.0-alpha.0(transitive)
+ Added@visx/shape@2.17.0-alpha.0(transitive)
- Removed@visx/curve@2.1.0(transitive)
- Removed@visx/group@2.10.0(transitive)
- Removed@visx/point@2.6.0(transitive)
- Removed@visx/scale@2.2.2(transitive)
- Removed@visx/shape@2.12.2(transitive)
Updated@visx/curve@2.17.0-alpha.0
Updated@visx/group@2.17.0-alpha.0
Updated@visx/point@2.17.0-alpha.0
Updated@visx/scale@2.17.0-alpha.0
Updated@visx/shape@2.17.0-alpha.0