@nivo/scales
Advanced tools
Comparing version 0.72.0 to 0.73.0
@@ -131,2 +131,6 @@ 'use strict'; | ||
return function (value) { | ||
if (value === undefined) { | ||
return value; | ||
} | ||
if (format === 'native' || value instanceof Date) { | ||
@@ -237,3 +241,4 @@ return precisionFn(value); | ||
var scale = useUTC ? d3Scale.scaleUtc() : d3Scale.scaleTime(); | ||
scale.domain([minValue, maxValue]).range([0, size]); | ||
scale.range([0, size]); | ||
if (minValue && maxValue) scale.domain([minValue, maxValue]); | ||
if (nice === true) scale.nice();else if (typeof nice === 'object' || typeof nice === 'number') scale.nice(nice); | ||
@@ -240,0 +245,0 @@ var typedScale = scale; |
@@ -125,2 +125,6 @@ import uniq from 'lodash/uniq'; | ||
return function (value) { | ||
if (value === undefined) { | ||
return value; | ||
} | ||
if (format === 'native' || value instanceof Date) { | ||
@@ -231,3 +235,4 @@ return precisionFn(value); | ||
var scale = useUTC ? scaleUtc() : scaleTime(); | ||
scale.domain([minValue, maxValue]).range([0, size]); | ||
scale.range([0, size]); | ||
if (minValue && maxValue) scale.domain([minValue, maxValue]); | ||
if (nice === true) scale.nice();else if (typeof nice === 'object' || typeof nice === 'number') scale.nice(nice); | ||
@@ -234,0 +239,0 @@ var typedScale = scale; |
@@ -129,2 +129,6 @@ (function (global, factory) { | ||
return function (value) { | ||
if (value === undefined) { | ||
return value; | ||
} | ||
if (format === 'native' || value instanceof Date) { | ||
@@ -235,3 +239,4 @@ return precisionFn(value); | ||
var scale = useUTC ? d3Scale.scaleUtc() : d3Scale.scaleTime(); | ||
scale.domain([minValue, maxValue]).range([0, size]); | ||
scale.range([0, size]); | ||
if (minValue && maxValue) scale.domain([minValue, maxValue]); | ||
if (nice === true) scale.nice();else if (typeof nice === 'object' || typeof nice === 'number') scale.nice(nice); | ||
@@ -238,0 +243,0 @@ var typedScale = scale; |
@@ -10,3 +10,3 @@ export declare const timePrecisions: readonly ["millisecond", "second", "minute", "hour", "day", "month", "year"]; | ||
useUTC?: boolean | undefined; | ||
}) => (value: Date | string) => Date; | ||
}) => (value: Date | string | undefined) => Date | undefined; | ||
//# sourceMappingURL=timeHelpers.d.ts.map |
{ | ||
"name": "@nivo/scales", | ||
"version": "0.72.0", | ||
"version": "0.73.0", | ||
"license": "MIT", | ||
@@ -36,3 +36,3 @@ "author": { | ||
}, | ||
"gitHead": "26098f6437cd8ab2be166bbc52973dcbb5ee7569" | ||
"gitHead": "919f213600a08609939198ea743f7dbde9a572e2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
189825
1670