我用8只股票和12只股票進行了R降價。正如你所看到的股票圖表越來越小。有沒有辦法強制flexdashboard保持更大的寬度?當屏幕上有12個或更多的股票時,我不介意垂直滾動。R:flexdashboard縮小內容,以任何方式來防止這種情況?
rmarkdown::render('foo.Rmd')
# creates foo.html
foo.Rmd
---
title: "Semiconductor: 5 years"
output:
flexdashboard::flex_dashboard:
orientation: rows
---
```{r setup, include=FALSE}
library(quantmod)
options("getSymbols.warning4.0"=FALSE)
options("getSymbols.yahoo.warning"=FALSE)
getSymbols(c("APH","IBM","CCL","TSS","HSY","COH","QRVO","CMA","RJF","ABBV","SCHW","RTN"), src="yahoo", from="2012-01-01")
```
Row
-------------------------------------
### APH
```{r, fig.height=5}
chartSeries(APH, type="line", subset="last 5 years", TA=NULL)
```
### IBM
```{r, fig.height=5}
chartSeries(IBM, type="line", subset="last 5 years", TA=NULL)
```
### CCL
```{r, fig.height=5}
chartSeries(CCL, type="line", subset="last 5 years", TA=NULL)
```
### TSS
```{r, fig.height=5}
chartSeries(TSS, type="line", subset="last 5 years", TA=NULL)
```
Row
-------------------------------------
### HSY
```{r, fig.height=5}
chartSeries(HSY, type="line", subset="last 5 years", TA=NULL)
```
### COH
```{r, fig.height=5}
chartSeries(COH, type="line", subset="last 5 years", TA=NULL)
```
### QRVO
```{r, fig.height=5}
chartSeries(QRVO, type="line", subset="last 5 years", TA=NULL)
```
### CMA
```{r, fig.height=5}
chartSeries(CMA, type="line", subset="last 5 years", TA=NULL)
```
Row
-------------------------------------
### RJF
```{r, fig.height=5}
chartSeries(RJF, type="line", subset="last 5 years", TA=NULL)
```
### ABBV
```{r, fig.height=5}
chartSeries(ABBV, type="line", subset="last 5 years", TA=NULL)
```
### SCHW
```{r, fig.height=5}
chartSeries(SCHW, type="line", subset="last 5 years", TA=NULL)
```
### RTN
```{r, fig.height=5}
chartSeries(RTN, type="line", subset="last 5 years", TA=NULL)
```
foo.Rmd(垂直滾動)
---
title: "Semiconductor: 5 years"
output:
flexdashboard::flex_dashboard:
vertical_layout: scroll
orientation: rows
---
```{r setup, include=FALSE}
library(quantmod)
options("getSymbols.warning4.0"=FALSE)
options("getSymbols.yahoo.warning"=FALSE)
getSymbols(c("MTB","IVZ","UAL","MOS","MCK","ADSK","LEG","STT","RMD","EBAY","RF","FIS"), src="yahoo", from="2012-01-01")
```
Row
-------------------------------------
### MTB
```{r}
chartSeries(MTB, type="line", subset="last 5 years", TA=NULL)
```
### IVZ
```{r}
chartSeries(IVZ, type="line", subset="last 5 years", TA=NULL)
```
### UAL
```{r}
chartSeries(UAL, type="line", subset="last 5 years", TA=NULL)
```
### MOS
```{r}
chartSeries(MOS, type="line", subset="last 5 years", TA=NULL)
```
Row
-------------------------------------
### MCK
```{r}
chartSeries(MCK, type="line", subset="last 5 years", TA=NULL)
```
### ADSK
```{r}
chartSeries(ADSK, type="line", subset="last 5 years", TA=NULL)
```
### LEG
```{r}
chartSeries(LEG, type="line", subset="last 5 years", TA=NULL)
```
### STT
```{r}
chartSeries(STT, type="line", subset="last 5 years", TA=NULL)
```
Row
-------------------------------------
### RMD
```{r}
chartSeries(RMD, type="line", subset="last 5 years", TA=NULL)
```
### EBAY
```{r}
chartSeries(EBAY, type="line", subset="last 5 years", TA=NULL)
```
### RF
```{r}
chartSeries(RF, type="line", subset="last 5 years", TA=NULL)
```
### FIS
```{r}
chartSeries(FIS, type="line", subset="last 5 years", TA=NULL)
```
Flex的設計努力,以適應您的內容,也許你需要重新考慮你的佈局,每行具有更少的地塊。 –
原則上,按照[此處](http://rmarkdown.rstudio.com/flexdashboard/using.html)中所述的方法將'vertical_layout:scroll'添加到您的YAML中。 –