Added a Date & DateTime method for widen - enables xlims with Date or DateTime types

This commit is contained in:
Thatcher Chamberlin 2020-12-01 18:36:43 -05:00
parent c35adbfeff
commit b046ed9b90

View File

@ -426,6 +426,11 @@ end
# -------------------------------------------------------------------------
# handle widen in the case that xlims are of type Date or DateTime
function widen(dmin::Union{Date,DateTime}, dmax::Union{Date,DateTime}, scale = :identity)
widen(Dates.value(dmin), Dates.value(dmax), scale)
end
# push the limits out slightly
function widen(lmin, lmax, scale = :identity)
f, invf = RecipesPipeline.scale_func(scale), RecipesPipeline.inverse_scale_func(scale)