I'd like to display a time series as a highchart interactive graphic. However, in the following R scrip the dates are not displayed correctly all. The numerical value for the date is cut after five digits, making them appear all on the same day and time. Anyone experienced and solved something similar?
library(plyr)
library(rCharts)
library(rHighcharts)
cs <-c("13-10-30 12:30:00", "13-10-30 12:35:00", "13-10-30 12:40:00",
"13-10-30 12:45:00", "13-10-30 12:50:00", "13-10-30 12:55:00")
x <-strptime(cs, "%y-%m-%d %H:%M:%S")
dfr <-data.frame(date=as.POSIXct(x,origin="1970-01-01"),
value=c(1.5,1.25,.75,2.1,1.3,1.4))
hpl <- hPlot(
value~date,
data = dfr,
type = "scatter"
)
hpl$xAxis(type = "datetime")
hpl$chart(zoomType = "x")
hpl$plotOptions(
line = list(
marker = list(enabled = F)
)
)
hpl