データテーブルオブジェクトの上にテキストがある場合、テーブルは切り捨てられ、ページネーションは表示されなくなります。
1つのフレックスダッシュボードコンテナに収まるようにデータテーブルのサイズを設定することは可能ですか?
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r, results='asis'}
cat("This is a text\n\nThis is a text")
```
```{r}
mtcars %>% datatable(options = list(dom = 'tp'))
```
いくつかのオプションがあります。を使用できますvertical_layout: scroll
。これにより、テキストをテーブルと同じコンテナに保持しながら、ページネーションを機能させることができます。
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: scroll
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r, results='asis'}
cat("This is a text\n\nThis is a text")
```
```{r}
mtcars %>% datatable(options = list(dom = 'tp'))
```
または、テキストと表に別々のコンテナを使用することもできます。{data-height}
これを行う場合は、コンテナの高さをで設定することをお勧めします。
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
library(DT)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Text A {data-height=50}
```{r, results='asis'}
cat("This is a text\n\nThis is a text")
```
### Chart A
```{r}
mtcars %>% datatable(options = list(dom = 'tp'))
```
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加