I'm trying to put multiple dygraph plots on a single tab of a flexdashboard. I've tried a bunch of different options from here and from here
My RMD file looks like this:
---
title: "Project Dashboard"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: scroll
---
# Intro {.sidebar}
# Page 1
## Column 1 {.tabset .tabset-fade data-width=850}
### Site 1
```{r Data, echo=FALSE, fig.height=2}
s <- dygraph(as.xts(df,order.by=df$DateTime), group = "NC") %>%
dyOptions(drawPoints = TRUE, pointSize = 1) %>%
dyAxis("y", label = "Salinity (PSU)", valueRange = c(16, 30)) %>%
dyRangeSelector(height = 20) %>%
dyLegend(width = 400)
t <- dygraph(as.xts(df,order.by=df$DateTime), group = "NC") %>%
dyOptions(drawPoints = TRUE, pointSize = 1) %>%
dyAxis("y", label = "Temperature (°C)", valueRange = c(0, 30)) %>%
dyRangeSelector(height = 20) %>%
dyLegend(show = "follow", width = 400)
dy_graph <- list(s,t)
pt <- htmltools::browsable(htmltools::tagList(dy_graph))
pt
```
I've tried a variety of other combinations but it either just plots the first plot, puts the two plots on top of each other, or squishes them together into a tiny space. I even tried using a 4th-level markdown header (####), but that doesn't seem to do anything either.
Any thoughts?