10

I'm building a flexdashboard in R with multiple pages (tabs). The navigation bar becomes two or more rows and overlaps/covers the content of the main panel when I reduce the width of the page.

How do I fix the navigation bar so that it remains one row regardless of width adjustment? Or how do I add padding between the navigation bar and main panel to prevent overlap?

I have attached images of the correct view and problematic view below.

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

Edit: Here is the flexdashboard script used to provide the two images above.

   ---
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
============================================================
Sujin
  • 103
  • 1
  • 6
  • 1
    You should provide code in the form of a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). That will make it much easier to help you. – MrFlick Mar 20 '17 at 22:21
  • Thanks for the suggestion @MrFlick. Just added! – Sujin Mar 20 '17 at 23:26

2 Answers2

4

I had the same problem -- just solved it (sorta) by using the data-navmenu attribute. It'll give you a drop-down menu instead of tabs, but it is a quick fix to the overlap problem.

Try, e.g.

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

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


Long Tab 1 {data-navmenu="Project Sections"}
============================================================
### Chart A

```{r}

```


Another Long Tab 2 {data-navmenu="Project Sections"}
============================================================
Column {data-width=350}
-----------------------------------------------------------------------

### Chart B

```{r}

```


Joy
  • 769
  • 6
  • 24
0

You can also try adding a space using html between the column code and its content:

Nice looking data
================================

Column{data-width=700}
-----------------------------------------------------------------------

<br>
Luis
  • 61
  • 4
  • 9