I am trying to use flexdashboard::gauge, but it is always the same size (does not scale), and I do not know how to resize it. I know that there is a way to do this is for the ordinary graphs using renderPlotand installation, for example height. Is there a way to do something similar with renderGauge?
This is my code:
---
title: "Test"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
```{r setup, include=FALSE}
library(flexdashboard)
library(shiny)
library(googleVis)
```
Column {.sidebar}
-----------------------------------------------------------------------
```{r}
selectInput("n", label = "Number of bins:",
choices = c(10, 20, 35, 50), selected = 20)
```
Column {data-width=500}
-----------------------------------------------------------------------
```{r}
renderGauge({
invalidateLater(1000, session)
dane <- round(runif(1,0,100))
df <- data.frame(Label = "IRR", Value = as.numeric(dane))
gauge(dane, min = 0, max = 100, symbol = '%', gaugeSectors(
success = c(80, 100), warning = c(40, 79), danger = c(0, 39)
))
})
```
```{r }
renderPlot({
plot(1:10,1:10)
})
```
Column {data-width=500}
-----------------------------------------------------------------------
```{r}
renderPlot({
plot(1:10,1:10)
})
```
```{r}
renderPlot({
plot(1:10,1:10)
})
```
The rest of the charts should fill the place. Do you know how to increase this indicator? Thank!
source
share