我正在学习 flexdashboard 并为未来的应用程序尝试一些不同的布局。但我无法为同一页面分配不同的属性。
我希望第二页有一个行布局,列在导航栏 A 中,并在标题前面有一个图标。
当我这样写时:{data-orientation=rows, data-navmenu="Menu A", data-icon="fa-list"}
它们都没有被使用。当这样写时:{data-orientation=rows}, {data-navmenu="Menu A"}, {data-icon="fa-list"}
仅执行最后一个,前两个放在页面标题中。当使用第二个不带逗号时,会发生同样的事情。
我在 中没有找到页面的多个属性的任何示例examples http://rmarkdown.rstudio.com/flexdashboard/examples.html.
我如何将它们结合起来?这一定是可能的,因为我无法想象我必须在为我的页面提供行格式和将其放入下拉菜单之间做出选择......
这是我使用的代码:
title: "My flexdash"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Page 1 {data-navmenu="Menu A"}
======================================
Column {data-width=350}
-----------------------------------------------------------------------
### Chart A
```{r}
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart B
```{r}
```
# need these attributes to be working but invisible
Page 2 {data-orientation=rows}, {data-navmenu="Menu A"}, {data-icon="fa-list"}
=============================================
Row {data-width=650}
-----------------------------------------------------------------------
### Chart C
```{r}
```
Row {data-width=350}
-----------------------------------------------------------------------
### Chart D
```{r}
```
找到答案:我只需要用空格将它们分开......
Page 2 {data-orientation=rows data-navmenu="Menu A" data-icon="fa-list"}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)