0

I am having problems setting a Darkly theme to an RMarkdown document. I am getting a light greenish background instead. Is there a solution for it? See below

---
title: "Untitled"
author:
date: "July 29, 2020"
output:
  flexdashboard::flex_dashboard:
   theme: darkly
runtime: shiny
---
  
  
  ```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```



```{r eruptions, echo=FALSE}
inputPanel(
  selectInput("n_breaks", label = "Number of bins:",
              choices = c(10, 20, 35, 50), selected = 20),
  
  sliderInput("bw_adjust", label = "Bandwidth adjustment:",
              min = 0.2, max = 2, value = 1, step = 0.2)
)

renderPlot({
  hist(faithful$eruptions, probability = TRUE, breaks = as.numeric(input$n_breaks),
       xlab = "Duration (minutes)", main = "Geyser eruption duration")
  
  dens <- density(faithful$eruptions, adjust = input$bw_adjust)
  lines(dens, col = "blue")
})
```
Daniel_j_iii
  • 3,041
  • 2
  • 11
  • 27
Kishron
  • 1
  • 1
  • It appears Darkly isn't a default theme you can specify like that, unless you do a full on shiny app. I worked on a question recently where flexdashboard themes were not working properly like your experience, [according to RStudio](https://rmarkdown.rstudio.com/flexdashboard/using.html#appearance) – Daniel_j_iii Jul 29 '20 at 22:08
  • [here is the other flexdashboard question regarding themes](https://stackoverflow.com/questions/62905726/bootswatch-theme-in-shiny-flexdashboard-r/62906378#62906378) – Daniel_j_iii Jul 30 '20 at 01:31
  • Hi @DanielJachetta, Thanks for your response. I will try adding the themes via css. – Kishron Jul 30 '20 at 14:20
  • yes and on the second link I posted, a user gave a great explanation on the bootstrap .CSS and how to modify it for Flexdashboard, since some of the classes and divs in bootstrap are different for flexdashboard – Daniel_j_iii Jul 30 '20 at 14:49

0 Answers0