jbkunst / highcharter

R wrapper for highcharts
http://jkunst.com/highcharter/
Other
720 stars 149 forks source link

Error: All arguments must be named list #79

Closed adymimos closed 8 years ago

adymimos commented 8 years ago

Seasonal Decomposition of timeseries, returning error. Issue occurs only with github install.

require(highcharter)    
x <- stl(log(AirPassengers), "per")   
hchart(x)
Error: All arguments must be named list

Thanks a lot for this wonderful package

jbkunst commented 8 years ago

@adymimos

Yep, I know about this issue. And I'm working in this.

This happend when you add more axis via hc_yAxis hc_yAxis(list(list(...), list(...))) So the big list its not named (a validation that I put to the arguments) .

Sorry! :pray: :disappointed: And give me some time to fix this thing!

Thanks for open this issue! Regards!

jbkunst commented 8 years ago

@adymimos

Now it works!

Thanks again for test/use the package!

adymimos commented 8 years ago

Thanks a lot. its working now. :-)

once again...thanks a lot for this wonderful package..

jbkunst commented 8 years ago

And thanks to you for come up with this issue and make this package better!

tbenschop commented 8 years ago

@jbkunst I stil have the error in the hc<-highchart() %>% format: This is not the entire code, but does already give the error msg.

plotdata2<-data.table(DATE=c(2012:2015))
hc<-highchart() %>% 
  hc_chart(animation = FALSE) %>% 
  hc_title(text = "Macro data") %>% 
  hc_xAxis(categories=as.character(plotdata2$DATE),#tickInterval=4,#tickInterval=4,#type='datetime',
           labels=list(rotation=45)

) %>% 
  hc_yAxis(
    list(
      title = list(text = paste0('Manufacturing')),
      align = "left",
      showFirstLabel = FALSE,
      showLastLabel = FALSE#,
      #labels = list(format = "{value} &#176;C", useHTML = TRUE)
    ),
    list(
      title = list(text = "One"),
      align = "right",
      showFirstLabel = FALSE,
      showLastLabel = FALSE,
      #labels = list(format = "{value} mm"),
      opposite = TRUE
    )
  )
jbkunst commented 8 years ago

Hi @adymimos,

If you need to add more than one yAxis use hc_yAxis_multiples (development version) instead. And if you want generate more yAxis automatically (and add with hc_yAxis_multiples) you can use create_yaxis function. Check http://rpubs.com/jbkunst/create_yaxis.

Tell me if this help you.

tbenschop commented 8 years ago

@jbkunst Thanks, that helps indeed.