rHighcharts hide/unhide not working in shiny

As an independent code the hide/unhide is working, but not in shiny

I have a data frame df as below

Date       Category     Number
2014-01-01   AA            2
2014-01-01   BB            4
2014-01-01   CC            3
2014-01-01   DD            11
2014-01-02   AA            21
2014-01-02   BB            14
2014-01-02   CC            12
2014-01-02   DD            14
2014-01-03   AA            11
2014-01-03   BB            13
2014-01-03   CC            9
2014-01-03   DD            11

I am trying to plot stacked bar plot with hide/unhide option. I tried to use the below example hide/unhide is not working. If I hide the data that is in the middle, it is not rescaling. http://glimmer.rstudio.com/reinholdsson/rHighcharts/

I also tried below example, but it is confusing and not showing any plot at all. http://rcharts.io/viewer/?5842467#.UuuYLKX-aQw

My code is

b <- rCharts:::Highcharts$new()
b$chart(type = "column")
b$plotOptions(column = list(stacking = "normal"))
b$xAxis(categories = unique(as.character(df$Date)))
tt = sapply(unique(as.character(df$Category)), function(name){
   d <- df[df$Category == name, ]
   b$series(name = name, data = d$Number, stack = d$Category[[1]])

with the above code the stacking option is gone.


I changed

b$series(name = name, data = d$Number, stack = d$Category[[1]])


b$series(name = name, data = d$Number, stack = d$Date[[1]])

Took little time to understand. I want to stack by Date so have to choose date here.

But the hide/unhide is not rescaling, instead disappearing the bar corresponding to the category.

Need Your Help

Sending SMTP email from PHP Script hosted on Hostgator Servers

php codeigniter email gmail

I have created a web application as such in the application I require to send to send users their passwords if they have forgotten them. Now I use a gmail account to send the email. When I send the...

assembly-merge-strategy issues using sbt-assembly

scala deployment sbt executable-jar sbt-assembly

I am trying to convert a scala project into a deployable fat jar using sbt-assembly. When I run my assembly task in sbt I am getting the following error: