I can not get my month labels (let say Jan/15) on x. Tried all things, what the trick ? If I use YYYYMM it's kinda ok, but I need more readable. Is it possible to change background color too?
require(shiny)
require(rCharts)
x <- data.frame(Category=factor(c("Alpha", "Alpha","Alpha","Alpha","Alpha")),
YYYYMM= factor(c("2/1/2015","3/1/2015","4/1/2015","5/1/2015","6/1/2015")),
COUNT=c(44,22,37,76,97))
str(x)
to_jsdate2 <- function(x){
as.numeric(as.POSIXct(as.Date(x), origin="1970-01-01")) * 1000}
x$DATEPX <- to_jsdate2(as.Date(x$YYYYMM))
myplot <- hPlot(COUNT ~ YYYYMM, data=x, type="line")
#myplot$xAxis(title = list (text = "Time"), type= "datetime")
myplot
And I doing this x labels dissappeared
myplot <- hPlot(COUNT ~ DATEPX, data=x, type="line")
myplot$xAxis(title =list (text = "Month") , type= "datetime")
myplot