fix Date recipe; closes #529
This commit is contained in:
parent
ae608d4d78
commit
b9dea42be6
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user