Open erikarasnick opened 1 year ago
Thanks for reporting. Here's a more minimal reprex without {flexdashboard}
. Also, since the error actually derives from Shiny's codebase, I'll be transferring the issue other there.
---
title: "thematic+renderPlot() in Rmd error"
output: rmarkdown::html_document
runtime: shiny
---
```{r}
thematic::thematic_shiny(bg = "auto", fg = "auto")
sliderInput("bins", "Number of bins:", 1, 50, 30)
renderPlot({
plot(1:10)
})
Also, I'm sure we can avoid the error in this case, but I'm not sure whether we'll be able to get the "auto theming" behavior to work in the way you might be expecting. The good news, though, is that you can workaround the problem by creating an explicit plotOutput()
container, like this:
---
title: "Suggested fix"
output:
flexdashboard::flex_dashboard:
theme:
version: 5
bootswatch: "darkly"
runtime: shiny
---
```{r}
thematic::thematic_shiny(bg = "auto", fg = "auto")
sliderInput("bins", "Number of bins:", 1, 50, 30)
plotOutput("p")
output$p <- renderPlot({
plot(1:10)
})
Describe the problem
When I specify a preset bootswatch theme in the yaml header, then use
thematic::thematic_shiny()
I get this error: