@nivo/scales
Advanced tools
Comparing version 0.62.0 to 0.63.0
@@ -95,2 +95,31 @@ 'use strict'; | ||
var symlogScale = function symlogScale(_ref, xy, width, height) { | ||
var axis = _ref.axis, | ||
_ref$constant = _ref.constant, | ||
constant = _ref$constant === void 0 ? 1 : _ref$constant, | ||
_ref$min = _ref.min, | ||
min = _ref$min === void 0 ? 'auto' : _ref$min, | ||
_ref$max = _ref.max, | ||
max = _ref$max === void 0 ? 'auto' : _ref$max; | ||
var values = xy[axis]; | ||
var size = axis === 'x' ? width : height; | ||
var minValue = min; | ||
if (min === 'auto') { | ||
minValue = values.min; | ||
} | ||
var maxValue = max; | ||
if (max === 'auto') { | ||
maxValue = values.max; | ||
} | ||
var scale = d3Scale.scaleSymlog().domain([minValue, maxValue]).constant(constant).rangeRound(axis === 'x' ? [0, size] : [size, 0]).nice(); | ||
scale.type = 'symlog'; | ||
return scale; | ||
}; | ||
var symLogScalePropTypes = { | ||
type: PropTypes.oneOf(['symlog']).isRequired, | ||
constant: PropTypes.number, | ||
min: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]), | ||
max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]) | ||
}; | ||
var pointScale = function pointScale(_ref, xy, width, height) { | ||
@@ -108,4 +137,17 @@ var axis = _ref.axis; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
var _precisionCutOffsByTy; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var TIME_PRECISION_MILLISECOND = 'millisecond'; | ||
@@ -201,8 +243,64 @@ var TIME_PRECISION_SECOND = 'second'; | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; } | ||
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(n); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
var getOtherAxis = function getOtherAxis(axis) { | ||
@@ -219,6 +317,6 @@ return axis === 'x' ? 'y' : 'x'; | ||
var series = _series.map(function (serie) { | ||
return _objectSpread({}, serie, { | ||
return _objectSpread2(_objectSpread2({}, serie), {}, { | ||
data: serie.data.map(function (d) { | ||
return { | ||
data: _objectSpread({}, d) | ||
data: _objectSpread2({}, d) | ||
}; | ||
@@ -235,6 +333,6 @@ }) | ||
} | ||
var xScale = computeScale(_objectSpread({}, xScaleSpec, { | ||
var xScale = computeScale(_objectSpread2(_objectSpread2({}, xScaleSpec), {}, { | ||
axis: 'x' | ||
}), xy, width, height); | ||
var yScale = computeScale(_objectSpread({}, yScaleSpec, { | ||
var yScale = computeScale(_objectSpread2(_objectSpread2({}, yScaleSpec), {}, { | ||
axis: 'y' | ||
@@ -250,3 +348,3 @@ }), xy, width, height); | ||
}); | ||
return _objectSpread({}, xy, { | ||
return _objectSpread2(_objectSpread2({}, xy), {}, { | ||
series: series, | ||
@@ -258,3 +356,3 @@ xScale: xScale, | ||
var computeScale = function computeScale(spec, xy, width, height) { | ||
if (spec.type === 'linear') return linearScale(spec, xy, width, height);else if (spec.type === 'point') return pointScale(spec, xy, width, height);else if (spec.type === 'time') return timeScale(spec, xy, width, height);else if (spec.type === 'log') return logScale(spec, xy, width, height); | ||
if (spec.type === 'linear') return linearScale(spec, xy, width, height);else if (spec.type === 'point') return pointScale(spec, xy, width, height);else if (spec.type === 'time') return timeScale(spec, xy, width, height);else if (spec.type === 'log') return logScale(spec, xy, width, height);else if (spec.type === 'symlog') return symlogScale(spec, xy, width, height); | ||
}; | ||
@@ -371,3 +469,3 @@ var generateSeriesXY = function generateSeriesXY(series, xScaleSpec, yScaleSpec) { | ||
id: v | ||
}, _defineProperty$1(_slice, otherAxis, data["".concat(otherAxis, "Scale")](v)), _defineProperty$1(_slice, "data", []), _slice); | ||
}, _defineProperty(_slice, otherAxis, data["".concat(otherAxis, "Scale")](v)), _defineProperty(_slice, "data", []), _slice); | ||
var compare = isDate(v) ? compareDateValues : compareValues; | ||
@@ -379,3 +477,3 @@ data.series.forEach(function (serie) { | ||
if (datum !== undefined) { | ||
slice.data.push(_objectSpread({}, datum, { | ||
slice.data.push(_objectSpread2(_objectSpread2({}, datum), {}, { | ||
serie: serie | ||
@@ -396,4 +494,11 @@ })); | ||
var scalePropType = PropTypes.oneOfType([PropTypes.shape(linearScalePropTypes), PropTypes.shape(pointScalePropTypes), PropTypes.shape(timeScalePropTypes), PropTypes.shape(logScalePropTypes)]); | ||
var scalePropType = PropTypes.oneOfType([PropTypes.shape(linearScalePropTypes), PropTypes.shape(pointScalePropTypes), PropTypes.shape(timeScalePropTypes), PropTypes.shape(logScalePropTypes), PropTypes.shape(symLogScalePropTypes)]); | ||
exports.TIME_PRECISION_DAY = TIME_PRECISION_DAY; | ||
exports.TIME_PRECISION_HOUR = TIME_PRECISION_HOUR; | ||
exports.TIME_PRECISION_MILLISECOND = TIME_PRECISION_MILLISECOND; | ||
exports.TIME_PRECISION_MINUTE = TIME_PRECISION_MINUTE; | ||
exports.TIME_PRECISION_MONTH = TIME_PRECISION_MONTH; | ||
exports.TIME_PRECISION_SECOND = TIME_PRECISION_SECOND; | ||
exports.TIME_PRECISION_YEAR = TIME_PRECISION_YEAR; | ||
exports.compareDateValues = compareDateValues; | ||
@@ -406,2 +511,4 @@ exports.compareValues = compareValues; | ||
exports.computeYSlices = computeYSlices; | ||
exports.createDateNormalizer = createDateNormalizer; | ||
exports.createPrecisionMethod = createPrecisionMethod; | ||
exports.generateSeriesAxis = generateSeriesAxis; | ||
@@ -416,2 +523,4 @@ exports.generateSeriesXY = generateSeriesXY; | ||
exports.pointScalePropTypes = pointScalePropTypes; | ||
exports.precisionCutOffs = precisionCutOffs; | ||
exports.precisionCutOffsByType = precisionCutOffsByType; | ||
exports.scalePropType = scalePropType; | ||
@@ -421,3 +530,5 @@ exports.stackAxis = stackAxis; | ||
exports.stackY = stackY; | ||
exports.timePrecisions = timePrecisions; | ||
exports.timeScale = timeScale; | ||
exports.timeScalePropTypes = timeScalePropTypes; | ||
//# sourceMappingURL=nivo-scales.cjs.js.map |
@@ -7,8 +7,8 @@ (function (global, factory) { | ||
PropTypes = PropTypes && PropTypes.hasOwnProperty('default') ? PropTypes['default'] : PropTypes; | ||
uniq = uniq && uniq.hasOwnProperty('default') ? uniq['default'] : uniq; | ||
uniqBy = uniqBy && uniqBy.hasOwnProperty('default') ? uniqBy['default'] : uniqBy; | ||
sortBy = sortBy && sortBy.hasOwnProperty('default') ? sortBy['default'] : sortBy; | ||
last = last && last.hasOwnProperty('default') ? last['default'] : last; | ||
isDate = isDate && isDate.hasOwnProperty('default') ? isDate['default'] : isDate; | ||
PropTypes = PropTypes && Object.prototype.hasOwnProperty.call(PropTypes, 'default') ? PropTypes['default'] : PropTypes; | ||
uniq = uniq && Object.prototype.hasOwnProperty.call(uniq, 'default') ? uniq['default'] : uniq; | ||
uniqBy = uniqBy && Object.prototype.hasOwnProperty.call(uniqBy, 'default') ? uniqBy['default'] : uniqBy; | ||
sortBy = sortBy && Object.prototype.hasOwnProperty.call(sortBy, 'default') ? sortBy['default'] : sortBy; | ||
last = last && Object.prototype.hasOwnProperty.call(last, 'default') ? last['default'] : last; | ||
isDate = isDate && Object.prototype.hasOwnProperty.call(isDate, 'default') ? isDate['default'] : isDate; | ||
@@ -94,2 +94,31 @@ var linearScale = function linearScale(_ref, xy, width, height) { | ||
var symlogScale = function symlogScale(_ref, xy, width, height) { | ||
var axis = _ref.axis, | ||
_ref$constant = _ref.constant, | ||
constant = _ref$constant === void 0 ? 1 : _ref$constant, | ||
_ref$min = _ref.min, | ||
min = _ref$min === void 0 ? 'auto' : _ref$min, | ||
_ref$max = _ref.max, | ||
max = _ref$max === void 0 ? 'auto' : _ref$max; | ||
var values = xy[axis]; | ||
var size = axis === 'x' ? width : height; | ||
var minValue = min; | ||
if (min === 'auto') { | ||
minValue = values.min; | ||
} | ||
var maxValue = max; | ||
if (max === 'auto') { | ||
maxValue = values.max; | ||
} | ||
var scale = d3Scale.scaleSymlog().domain([minValue, maxValue]).constant(constant).rangeRound(axis === 'x' ? [0, size] : [size, 0]).nice(); | ||
scale.type = 'symlog'; | ||
return scale; | ||
}; | ||
var symLogScalePropTypes = { | ||
type: PropTypes.oneOf(['symlog']).isRequired, | ||
constant: PropTypes.number, | ||
min: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]), | ||
max: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]) | ||
}; | ||
var pointScale = function pointScale(_ref, xy, width, height) { | ||
@@ -107,4 +136,17 @@ var axis = _ref.axis; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
var _precisionCutOffsByTy; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var TIME_PRECISION_MILLISECOND = 'millisecond'; | ||
@@ -200,8 +242,64 @@ var TIME_PRECISION_SECOND = 'second'; | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(Object(source)); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; } | ||
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
function _arrayWithoutHoles(arr) { | ||
if (Array.isArray(arr)) return _arrayLikeToArray(arr); | ||
} | ||
function _iterableToArray(iter) { | ||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) return; | ||
if (typeof o === "string") return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) n = o.constructor.name; | ||
if (n === "Map" || n === "Set") return Array.from(n); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); | ||
} | ||
function _nonIterableSpread() { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _toConsumableArray(arr) { | ||
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
var getOtherAxis = function getOtherAxis(axis) { | ||
@@ -218,6 +316,6 @@ return axis === 'x' ? 'y' : 'x'; | ||
var series = _series.map(function (serie) { | ||
return _objectSpread({}, serie, { | ||
return _objectSpread2(_objectSpread2({}, serie), {}, { | ||
data: serie.data.map(function (d) { | ||
return { | ||
data: _objectSpread({}, d) | ||
data: _objectSpread2({}, d) | ||
}; | ||
@@ -234,6 +332,6 @@ }) | ||
} | ||
var xScale = computeScale(_objectSpread({}, xScaleSpec, { | ||
var xScale = computeScale(_objectSpread2(_objectSpread2({}, xScaleSpec), {}, { | ||
axis: 'x' | ||
}), xy, width, height); | ||
var yScale = computeScale(_objectSpread({}, yScaleSpec, { | ||
var yScale = computeScale(_objectSpread2(_objectSpread2({}, yScaleSpec), {}, { | ||
axis: 'y' | ||
@@ -249,3 +347,3 @@ }), xy, width, height); | ||
}); | ||
return _objectSpread({}, xy, { | ||
return _objectSpread2(_objectSpread2({}, xy), {}, { | ||
series: series, | ||
@@ -257,3 +355,3 @@ xScale: xScale, | ||
var computeScale = function computeScale(spec, xy, width, height) { | ||
if (spec.type === 'linear') return linearScale(spec, xy, width, height);else if (spec.type === 'point') return pointScale(spec, xy, width, height);else if (spec.type === 'time') return timeScale(spec, xy, width, height);else if (spec.type === 'log') return logScale(spec, xy, width, height); | ||
if (spec.type === 'linear') return linearScale(spec, xy, width, height);else if (spec.type === 'point') return pointScale(spec, xy, width, height);else if (spec.type === 'time') return timeScale(spec, xy, width, height);else if (spec.type === 'log') return logScale(spec, xy, width, height);else if (spec.type === 'symlog') return symlogScale(spec, xy, width, height); | ||
}; | ||
@@ -370,3 +468,3 @@ var generateSeriesXY = function generateSeriesXY(series, xScaleSpec, yScaleSpec) { | ||
id: v | ||
}, _defineProperty$1(_slice, otherAxis, data["".concat(otherAxis, "Scale")](v)), _defineProperty$1(_slice, "data", []), _slice); | ||
}, _defineProperty(_slice, otherAxis, data["".concat(otherAxis, "Scale")](v)), _defineProperty(_slice, "data", []), _slice); | ||
var compare = isDate(v) ? compareDateValues : compareValues; | ||
@@ -378,3 +476,3 @@ data.series.forEach(function (serie) { | ||
if (datum !== undefined) { | ||
slice.data.push(_objectSpread({}, datum, { | ||
slice.data.push(_objectSpread2(_objectSpread2({}, datum), {}, { | ||
serie: serie | ||
@@ -395,4 +493,11 @@ })); | ||
var scalePropType = PropTypes.oneOfType([PropTypes.shape(linearScalePropTypes), PropTypes.shape(pointScalePropTypes), PropTypes.shape(timeScalePropTypes), PropTypes.shape(logScalePropTypes)]); | ||
var scalePropType = PropTypes.oneOfType([PropTypes.shape(linearScalePropTypes), PropTypes.shape(pointScalePropTypes), PropTypes.shape(timeScalePropTypes), PropTypes.shape(logScalePropTypes), PropTypes.shape(symLogScalePropTypes)]); | ||
exports.TIME_PRECISION_DAY = TIME_PRECISION_DAY; | ||
exports.TIME_PRECISION_HOUR = TIME_PRECISION_HOUR; | ||
exports.TIME_PRECISION_MILLISECOND = TIME_PRECISION_MILLISECOND; | ||
exports.TIME_PRECISION_MINUTE = TIME_PRECISION_MINUTE; | ||
exports.TIME_PRECISION_MONTH = TIME_PRECISION_MONTH; | ||
exports.TIME_PRECISION_SECOND = TIME_PRECISION_SECOND; | ||
exports.TIME_PRECISION_YEAR = TIME_PRECISION_YEAR; | ||
exports.compareDateValues = compareDateValues; | ||
@@ -405,2 +510,4 @@ exports.compareValues = compareValues; | ||
exports.computeYSlices = computeYSlices; | ||
exports.createDateNormalizer = createDateNormalizer; | ||
exports.createPrecisionMethod = createPrecisionMethod; | ||
exports.generateSeriesAxis = generateSeriesAxis; | ||
@@ -415,2 +522,4 @@ exports.generateSeriesXY = generateSeriesXY; | ||
exports.pointScalePropTypes = pointScalePropTypes; | ||
exports.precisionCutOffs = precisionCutOffs; | ||
exports.precisionCutOffsByType = precisionCutOffsByType; | ||
exports.scalePropType = scalePropType; | ||
@@ -420,2 +529,3 @@ exports.stackAxis = stackAxis; | ||
exports.stackY = stackY; | ||
exports.timePrecisions = timePrecisions; | ||
exports.timeScale = timeScale; | ||
@@ -427,1 +537,2 @@ exports.timeScalePropTypes = timeScalePropTypes; | ||
}))); | ||
//# sourceMappingURL=nivo-scales.umd.js.map |
@@ -46,5 +46,18 @@ /* | ||
export type Scale = LinearScale | PointScale | TimeScale | TimeScaleFormatted | LogScale | ||
export interface SymlogScale { | ||
type: 'symlog' | ||
constant?: number | ||
min?: 'auto' | number | ||
max?: 'auto' | number | ||
} | ||
export type Scale = | ||
| LinearScale | ||
| PointScale | ||
| TimeScale | ||
| TimeScaleFormatted | ||
| LogScale | ||
| SymlogScale | ||
export type ScaleFunc = (value: string | number | Date) => number | ||
} |
{ | ||
"name": "@nivo/scales", | ||
"version": "0.62.0", | ||
"version": "0.63.0", | ||
"license": "MIT", | ||
@@ -10,3 +10,3 @@ "author": { | ||
"main": "./dist/nivo-scales.cjs.js", | ||
"module": "./dist/nivo-scales.esm.js", | ||
"module": "./dist/nivo-scales.es.js", | ||
"files": [ | ||
@@ -29,3 +29,3 @@ "README.md", | ||
}, | ||
"gitHead": "a98a072c4fe5339457d26f396d032dfc302187bc" | ||
"gitHead": "defc453433d8e6767ba3d612cce0d05c119ec5ed" | ||
} |
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
187981
10
1536