gpt4 book ai didi

r - 防止导航栏在flexdashboard R中重叠内容

转载 作者:行者123 更新时间:2023-12-04 21:34:08 24 4
gpt4 key购买 nike

我正在R中构建具有多个页面(标签)的flexdashboard。当我减小页面的宽度时,导航栏变成两行或更多行,并且重叠/覆盖主面板的内容。

如何固定导航栏,使其无论宽度调整如何都保持一行?或者如何在导航栏和主面板之间添加填充以防止重叠?

我已附上以下正确 View 和有问题的 View 的图像。

What I want regardless of width adjustment: No overlap, container title "Chart B" is still visible

Overlap when I reduce width: navigation bar covers main panel and container title "Chart B" is now covered

编辑:这是用于提供上述两个图像的flexdashboard脚本。

   ---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---

```{r setup, include=FALSE}
library(flexdashboard)
```


Long Tab 1
============================================================
### Chart A

```{r}

```


Another Long Tab 2
============================================================
Column {data-width=350}
-----------------------------------------------------------------------

### Chart B

```{r}

```



Another Long Tab 3
============================================================
### Chart C

```{r}

```


Another Long Tab 4
============================================================




Another Long Tab 5
============================================================




Another Long Tab 6
============================================================

最佳答案

我遇到了同样的问题-通过使用data-navmenu属性解决了(排序)问题。它会为您提供一个下拉菜单,而不是选项卡,但这是解决重叠问题的快速解决方案。

尝试,例如

---
标题:“无标题”
输出:
flexdashboard::flex_dashboard:
方向:列
vertical_layout:填充
---

```{r setup,include = FALSE}
图书馆(flexdashboard)
```

长标签1 {data-navmenu =“Project Sections”}
================================================== ==========
###图表A

```{r}

```

另一个长标签2 {data-navmenu =“Project Sections”}
================================================== ==========
列{data-width = 350}
-------------------------------------------------- ---------------------

###图表B

```{r}

```

关于r - 防止导航栏在flexdashboard R中重叠内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42914936/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com