diff --git a/src/recipes.jl b/src/recipes.jl index 809c3477..e9c29cee 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -790,12 +790,6 @@ abline!(args...; kw...) = abline!(current(), args...; kw...) # ------------------------------------------------- # Dates -@recipe function f{T<:AbstractArray{Date}}(::Type{T}, dts::T) - date_formatter = dt -> string(convert(Date, dt)) - Formatted(map(dt->convert(Int,dt), dts), date_formatter) -end - -@recipe function f{T<:AbstractArray{DateTime}}(::Type{T}, dts::T) - date_formatter = dt -> string(convert(DateTime, dt)) - Formatted(map(dt->convert(Int,dt), dts), date_formatter) +@recipe function f{T<:Union{Date,DateTime}}(::Type{T}, dt::T) + dt -> convert(Int,dt), dt -> string(convert(Date, dt)) end diff --git a/src/series.jl b/src/series.jl index 86be6954..8b836af4 100644 --- a/src/series.jl +++ b/src/series.jl @@ -42,8 +42,8 @@ convertToAnyVector(v::Volume, d::KW) = Any[v], nothing # # vector of OHLC # convertToAnyVector(v::AVec{OHLC}, d::KW) = Any[v], nothing -# dates -convertToAnyVector{D<:Union{Date,DateTime}}(dts::AVec{D}, d::KW) = Any[dts], nothing +# # dates +# convertToAnyVector{D<:Union{Date,DateTime}}(dts::AVec{D}, d::KW) = Any[dts], nothing # list of things (maybe other vectors, functions, or something else) function convertToAnyVector(v::AVec, d::KW)