I built a web page using the amazing rCharts and knitr. My page combines rickshaw time series charts with sliders and a data table. When I add the datatable, all the sliders disappear from my rickshaw charts. I tried modifying the config.yml so that I didn't duplicate a call to the same resources, but that didn't resolve the issue. Any ideas would be a big help. Below is a reproducible r-markdown file that can be knit into an html page with knitr.
```{r echo = F, message = T, cache = F}
require(rCharts)
opts_knit$set(self.contained=T)
knitr::opts_chunk$set(results = 'asis', tidy = F, message = T, echo=F, fig.width=700)
```
### Chart
```{r chart}
# add dummy date column to iris to make a time series chart
x <- cbind(iris, date=seq.Date(as.Date("2010-01-01"), length.out=nrow(iris), by=1))
x$date <- as.double(as.POSIXct(x$date,origin="1970-01-01"))
r2 <- Rickshaw$new()
r2$layer(
Sepal.Length ~ date,
data = x,
type = "line",
min = "auto"
)
r2$set(
slider = TRUE,
title = "IRIS",
width = 700
)
r2$print('chart', include_assets=T, cdn=T)
```
### Table
```{r table}
r2 <- dTable(iris)
r2$print('table', include_assets=T, cdn=T)
```