Shiny flexdashboard中的可滚动选项卡

Shiny flexdashboard中的可滚动选项卡,shiny,flexdashboard,Shiny,Flexdashboard,我希望一切都好 我有这个flexdashboard应用程序。 [1]: 我希望“注释和公式”选项卡可以滚动,因为我计划写一大堆解释 下面是我使用的代码 --- title: "Finance" runtime: shiny output: flexdashboard::flex_dashboard: orientation: rows vertical_layout: fill smooth_scroll: true them

我希望一切都好

我有这个flexdashboard应用程序。 [1]: 我希望“注释和公式”选项卡可以滚动,因为我计划写一大堆解释

下面是我使用的代码

---
title: "Finance"
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
    smooth_scroll: true
    
    theme: simplex
---

```{r setup, include=FALSE}
library(flexdashboard)
library(fBasics)
library(FinTS)
library(tidyquant)
library(shiny)
library(quantmod)
library(ggplot2)
library(highcharter)
library(shinyjs)
library(htmltools)
scroll_css = "<style> #section-text {overflow-y: scroll;}</style>"
```

Sidebar {.sidebar}
=========================================
```{r echo=FALSE}
tags$h5("Please click the submit button after every input change")
tags$hr()

textInput("tickers","Ticker",value = "",placeholder = "tickers")
dateInput("from","Starting Date",format = "yyyy-mm-dd")
sliderInput("k","Number of Period",min = 0,max = 250,value = 10)
checkboxGroupInput("priceKind","Kind (Choose 1)",c("Open","High","Low","Close"),selected = "Close",inline = TRUE)
# Close = Adjusted
kind = c("Open","High","Low","Close")
kindIndex = c(1,2,3,4)
names(kindIndex) = kind

numericInput("x","Initial Investment in $",value = 0)
sliderInput("m","Number of Periods of Interest Payment per annum",min = 1,max = 365,value = 2)
sliderInput("r","Interest year per annum",min = 0,max = 1,value = 0.05)

actionButton("go","Submit")
```

CH 1
=========================================

Row {data-height=200}
-----------------------------------------

### Notes and Formulas
```{r}
htmltools::includeMarkdown('Notes.Rmd')
```

您可以添加一个css chunck,该css chunck将滚动添加到
部分注释和公式的类
图表填充区的div中:

```{css my-style, echo = FALSE}
#section-notes-and-formulas
  .chart-shim {
    overflow-y: scroll;
    }
```

非常感谢,HubertL。它工作得很好。你能为flexdashboard相关的CSS推荐一个好的学习材料吗?Firefox web inspector非常感谢你的建议
```{css my-style, echo = FALSE}
#section-notes-and-formulas
  .chart-shim {
    overflow-y: scroll;
    }
```