フレックスダッシュボードコンテナで追加のテキストによってテーブル(データテーブル)が切り捨てられるのを防ぐにはどうすればよいですか?

フロリアン

データテーブルオブジェクトの上にテキストがある場合、テーブルは切り捨てられ、ページネーションは表示されなくなります。

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'))
```
joshpk

いくつかのオプションがあります。を使用できます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]

編集
0

コメントを追加

0

関連記事

Related 関連記事

ホットタグ

アーカイブ