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
|
# Dates
|
||||||
|
|
||||||
@recipe function f{T<:AbstractArray{Date}}(::Type{T}, dts::T)
|
@recipe function f{T<:Union{Date,DateTime}}(::Type{T}, dt::T)
|
||||||
date_formatter = dt -> string(convert(Date, dt))
|
dt -> convert(Int,dt), 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)
|
|
||||||
end
|
end
|
||||||
|
|||||||
@ -42,8 +42,8 @@ convertToAnyVector(v::Volume, d::KW) = Any[v], nothing
|
|||||||
# # vector of OHLC
|
# # vector of OHLC
|
||||||
# convertToAnyVector(v::AVec{OHLC}, d::KW) = Any[v], nothing
|
# convertToAnyVector(v::AVec{OHLC}, d::KW) = Any[v], nothing
|
||||||
|
|
||||||
# dates
|
# # dates
|
||||||
convertToAnyVector{D<:Union{Date,DateTime}}(dts::AVec{D}, d::KW) = Any[dts], nothing
|
# convertToAnyVector{D<:Union{Date,DateTime}}(dts::AVec{D}, d::KW) = Any[dts], nothing
|
||||||
|
|
||||||
# list of things (maybe other vectors, functions, or something else)
|
# list of things (maybe other vectors, functions, or something else)
|
||||||
function convertToAnyVector(v::AVec, d::KW)
|
function convertToAnyVector(v::AVec, d::KW)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user