@nivo/scales
Advanced tools
Comparing version 0.59.1 to 0.59.3
@@ -23,3 +23,5 @@ 'use strict'; | ||
_ref$stacked = _ref.stacked, | ||
stacked = _ref$stacked === void 0 ? false : _ref$stacked; | ||
stacked = _ref$stacked === void 0 ? false : _ref$stacked, | ||
_ref$reverse = _ref.reverse, | ||
reverse = _ref$reverse === void 0 ? false : _ref$reverse; | ||
var values = xy[axis]; | ||
@@ -35,3 +37,4 @@ var size = axis === 'x' ? width : height; | ||
} | ||
var scale = d3Scale.scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]).domain([minValue, maxValue]); | ||
var scale = d3Scale.scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]); | ||
if (reverse === true) scale.domain([maxValue, minValue]);else scale.domain([minValue, maxValue]); | ||
scale.type = 'linear'; | ||
@@ -45,3 +48,4 @@ scale.stacked = stacked; | ||
max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]), | ||
stacked: PropTypes.bool | ||
stacked: PropTypes.bool, | ||
reverse: PropTypes.bool | ||
}; | ||
@@ -48,0 +52,0 @@ |
@@ -17,3 +17,5 @@ import PropTypes from 'prop-types'; | ||
_ref$stacked = _ref.stacked, | ||
stacked = _ref$stacked === void 0 ? false : _ref$stacked; | ||
stacked = _ref$stacked === void 0 ? false : _ref$stacked, | ||
_ref$reverse = _ref.reverse, | ||
reverse = _ref$reverse === void 0 ? false : _ref$reverse; | ||
var values = xy[axis]; | ||
@@ -29,3 +31,4 @@ var size = axis === 'x' ? width : height; | ||
} | ||
var scale = scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]).domain([minValue, maxValue]); | ||
var scale = scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]); | ||
if (reverse === true) scale.domain([maxValue, minValue]);else scale.domain([minValue, maxValue]); | ||
scale.type = 'linear'; | ||
@@ -39,3 +42,4 @@ scale.stacked = stacked; | ||
max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]), | ||
stacked: PropTypes.bool | ||
stacked: PropTypes.bool, | ||
reverse: PropTypes.bool | ||
}; | ||
@@ -42,0 +46,0 @@ |
@@ -21,3 +21,5 @@ (function (global, factory) { | ||
_ref$stacked = _ref.stacked, | ||
stacked = _ref$stacked === void 0 ? false : _ref$stacked; | ||
stacked = _ref$stacked === void 0 ? false : _ref$stacked, | ||
_ref$reverse = _ref.reverse, | ||
reverse = _ref$reverse === void 0 ? false : _ref$reverse; | ||
var values = xy[axis]; | ||
@@ -33,3 +35,4 @@ var size = axis === 'x' ? width : height; | ||
} | ||
var scale = d3Scale.scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]).domain([minValue, maxValue]); | ||
var scale = d3Scale.scaleLinear().rangeRound(axis === 'x' ? [0, size] : [size, 0]); | ||
if (reverse === true) scale.domain([maxValue, minValue]);else scale.domain([minValue, maxValue]); | ||
scale.type = 'linear'; | ||
@@ -43,3 +46,4 @@ scale.stacked = stacked; | ||
max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]), | ||
stacked: PropTypes.bool | ||
stacked: PropTypes.bool, | ||
reverse: PropTypes.bool | ||
}; | ||
@@ -46,0 +50,0 @@ |
@@ -15,2 +15,3 @@ /* | ||
stacked?: boolean | ||
reverse?: boolean | ||
} | ||
@@ -17,0 +18,0 @@ |
{ | ||
"name": "@nivo/scales", | ||
"version": "0.59.1", | ||
"version": "0.59.3", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "author": { | ||
}, | ||
"gitHead": "fd0fae79df817805e2e83115650cd22fb73059ce" | ||
"gitHead": "2dcea96fabb7916387edd5c952da812b39018b10" | ||
} |
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
52483
1219