Open WolfgangWeiss opened 8 months ago
This is not an issue with PlotlyJS precisely but with the dependency JSON.jl
: it doesn't have a method to create a simple type (string or number) from the more complicated Dates.Period
or Dates.CompoundPeriod
types, while supporting the Dates.TimeType
.
The question essentially reduces to how JSON.lower(v::T)
should be defined for the two types. We can't properly define these methods without committing type piracy. There is a proper way described here: https://github.com/JuliaIO/JSON.jl#customizing-json .
However, one might be tempted to just write PlotlyJS.JSON.lower(v::Dates.CompoundPeriod) = string(v)
and PlotlyJS.JSON.lower(v::Dates.Period) = string(v)
and still remain consistent with the implementation for Dates.TimeType
.
Plotting time series with the data type Date works as expected
Result:
But when using a Period data type such as Millisecond, Day, CompoundPeriod, ... the plot will appear blank
Result:
Version info