valueBox strange behaviour

Hi All. I've created a R Markdown file inside RStudio and loaded the package Flexdashboard in the hope to create some dashboard visualisations for my R scripts.

I'd like to use valueBoxes (http://rmarkdown.rstudio.com/flexdashboard/using.html#value_boxes) however, I'm finding some strange behaviour.

The code below will display me a valueBox, properly formatted with colour and icon etc.

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

```{r setup, include=FALSE}
library(flexdashboard)
``` 
```{r}
valueBox(12, icon = "ion-ios-people")
```

(Sorry I can't show you the image, new users can't include two images apparently)

However, when I amend my code to put the valueBox inside a column, like so

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

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

Column
-----------------------------------------------------------------------

### Chart A

```{r}
valueBox(12, icon = "ion-ios-people")
```

I get this - the formatting of everything seems to be ignored.

I'd really appreciate any feedback to explain this, because ultimately I will have to use columns, subtabs etc. within my dashboards and it appears that when I use these, the valueBox is ignored.

Many thanks,

Tony.

I know much time has passed since your post but could you try these two things:

(1) Update the packages flexdashboard and rmarkdown to the newest versions
(2) Try running this (it also fixes an error in supplied code):

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

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

Column
-----------------------------------------------------------------------

### Chart A

```{r}
valueBox(12, icon = "ion-ios-people")
```

Let me know if there are still problems with the valueBox appearing properly.

I am having a similar problem. But I get a blank box or just the number. I made sure that I just installed the newest version. I copied and pasted your code on to Rmarkdown and it still did not work.

1 Like