flexdashboard
flexdashboard copied to clipboard
vertical_scroll not working with facet_wrap
I want the flex dashboard to take up the full screen (full width, full height) and scroll to fit a large number of plots in a facet wrap. Code is provided below and produces un-readable plots super compressed vertically. how can I achieve this in flex dashboard?
output of knitting below: https://imgur.com/a/LyfZTw3
---
title: "facet test"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: scroll
---
```{r setup, include=FALSE}
library(flexdashboard)
library(nycflights13)
library(tidyr)
library(dplyr)
library(ggplot2)
```
Column
-----------------------------------------------------------------------
### Chart A
```{r dfs and plots, include=FALSE, warning=FALSE, cache=FALSE}
df <- flights %>%
group_by(dest, time_hour) %>%
summarise(n = n()) %>%
ungroup()
sp <- ggplot(df, aes(x=time_hour, y=n)) + geom_line()
fr <- sp + facet_wrap(~ dest)
```
```{r facet, out.width = '100%', warning=FALSE, echo=FALSE, message=FALSE, error=TRUE}
fr
```