Is there a way that i can make a flexdashboard gauge bigger in my shiny app?
I have tried to change the width and height in the UI but that just moves it around on the dashboard. It doesn't make it bigger.
library(shiny)
library(flexdashboard)
fluidRow(column(
width = 12,
gaugeOutput('Scale', width = "800px", height = "400px")
)
)
Do you mean something like this?
Just using some simple css.
library(shiny)
library(flexdashboard)
css <- HTML("
.html-widget.gauge svg {
height: 400px;
width: 800px;
}")
ui <- fluidPage(
tags$head(tags$style(css)),
fluidRow(column(
width = 12,
gaugeOutput('Scale')
)
)
)
server <- function(input, output, session) {
output$Scale <- renderGauge({
gauge(56, min = 0, max = 100, symbol = '%', label = paste("Test Label"),gaugeSectors(
success = c(100, 6), warning = c(5,1), danger = c(0, 1), colors = c("#CC6699")
))
})
}
shinyApp(ui, server)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With