@nivo/scales
Advanced tools
Comparing version 0.55.0 to 0.56.0
@@ -250,6 +250,15 @@ 'use strict'; | ||
var generateSeriesAxis = function generateSeriesAxis(series, axis, scaleSpec) { | ||
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, | ||
_ref$getValue = _ref.getValue, | ||
getValue = _ref$getValue === void 0 ? function (d) { | ||
return d.data[axis]; | ||
} : _ref$getValue, | ||
_ref$setValue = _ref.setValue, | ||
setValue = _ref$setValue === void 0 ? function (d, v) { | ||
d.data[axis] = v; | ||
} : _ref$setValue; | ||
if (scaleSpec.type === 'linear') { | ||
series.forEach(function (serie) { | ||
serie.data.forEach(function (d) { | ||
d.data[axis] = d.data[axis] === null ? null : parseFloat(d.data[axis]); | ||
setValue(d, getValue(d) === null ? null : parseFloat(getValue(d))); | ||
}); | ||
@@ -261,3 +270,3 @@ }); | ||
serie.data.forEach(function (d) { | ||
d.data[axis] = d.data[axis] === null ? null : parseTime(d.data[axis]); | ||
setValue(d, getValue(d) === null ? null : parseTime(getValue(d))); | ||
}); | ||
@@ -269,3 +278,3 @@ }); | ||
serie.data.forEach(function (d) { | ||
all.push(d.data[axis]); | ||
all.push(getValue(d)); | ||
}); | ||
@@ -272,0 +281,0 @@ }); |
@@ -244,6 +244,15 @@ import PropTypes from 'prop-types'; | ||
var generateSeriesAxis = function generateSeriesAxis(series, axis, scaleSpec) { | ||
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, | ||
_ref$getValue = _ref.getValue, | ||
getValue = _ref$getValue === void 0 ? function (d) { | ||
return d.data[axis]; | ||
} : _ref$getValue, | ||
_ref$setValue = _ref.setValue, | ||
setValue = _ref$setValue === void 0 ? function (d, v) { | ||
d.data[axis] = v; | ||
} : _ref$setValue; | ||
if (scaleSpec.type === 'linear') { | ||
series.forEach(function (serie) { | ||
serie.data.forEach(function (d) { | ||
d.data[axis] = d.data[axis] === null ? null : parseFloat(d.data[axis]); | ||
setValue(d, getValue(d) === null ? null : parseFloat(getValue(d))); | ||
}); | ||
@@ -255,3 +264,3 @@ }); | ||
serie.data.forEach(function (d) { | ||
d.data[axis] = d.data[axis] === null ? null : parseTime(d.data[axis]); | ||
setValue(d, getValue(d) === null ? null : parseTime(getValue(d))); | ||
}); | ||
@@ -263,3 +272,3 @@ }); | ||
serie.data.forEach(function (d) { | ||
all.push(d.data[axis]); | ||
all.push(getValue(d)); | ||
}); | ||
@@ -266,0 +275,0 @@ }); |
@@ -248,6 +248,15 @@ (function (global, factory) { | ||
var generateSeriesAxis = function generateSeriesAxis(series, axis, scaleSpec) { | ||
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, | ||
_ref$getValue = _ref.getValue, | ||
getValue = _ref$getValue === void 0 ? function (d) { | ||
return d.data[axis]; | ||
} : _ref$getValue, | ||
_ref$setValue = _ref.setValue, | ||
setValue = _ref$setValue === void 0 ? function (d, v) { | ||
d.data[axis] = v; | ||
} : _ref$setValue; | ||
if (scaleSpec.type === 'linear') { | ||
series.forEach(function (serie) { | ||
serie.data.forEach(function (d) { | ||
d.data[axis] = d.data[axis] === null ? null : parseFloat(d.data[axis]); | ||
setValue(d, getValue(d) === null ? null : parseFloat(getValue(d))); | ||
}); | ||
@@ -259,3 +268,3 @@ }); | ||
serie.data.forEach(function (d) { | ||
d.data[axis] = d.data[axis] === null ? null : parseTime(d.data[axis]); | ||
setValue(d, getValue(d) === null ? null : parseTime(getValue(d))); | ||
}); | ||
@@ -267,3 +276,3 @@ }); | ||
serie.data.forEach(function (d) { | ||
all.push(d.data[axis]); | ||
all.push(getValue(d)); | ||
}); | ||
@@ -270,0 +279,0 @@ }); |
{ | ||
"name": "@nivo/scales", | ||
"version": "0.55.0", | ||
"version": "0.56.0", | ||
"license": "MIT", | ||
@@ -18,5 +18,5 @@ "author": { | ||
"dependencies": { | ||
"d3-scale": "^2.1.2", | ||
"d3-scale": "^3.0.0", | ||
"d3-time-format": "^2.1.3", | ||
"lodash": "^4.17.4" | ||
"lodash": "^4.17.11" | ||
}, | ||
@@ -29,3 +29,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "4c4cbde54f3a954016a0d6a417a9a25a6e18e8f1" | ||
"gitHead": "99c7f6bd886d517f12fa04441b1102d082a1bf26" | ||
} |
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
50523
1177
+ Addedd3-array@2.12.1(transitive)
+ Addedd3-color@2.0.0(transitive)
+ Addedd3-format@2.0.0(transitive)
+ Addedd3-interpolate@2.0.1(transitive)
+ Addedd3-scale@3.3.0(transitive)
+ Addedd3-time@2.1.1(transitive)
+ Addedinternmap@1.0.1(transitive)
- Removedd3-array@1.2.4(transitive)
- Removedd3-collection@1.0.7(transitive)
- Removedd3-color@1.4.1(transitive)
- Removedd3-format@1.4.5(transitive)
- Removedd3-interpolate@1.4.0(transitive)
- Removedd3-scale@2.2.2(transitive)
Updatedd3-scale@^3.0.0
Updatedlodash@^4.17.11