'Flexdashboard gauge labels are cut off in shiny app
I have built an app that is heavily dependent on gauges to track progress. There was an issue with the label not updating with new input so I have updated my version of flexdashboard to the development version: remotes::install_github("rstudio/flexdashboard").
However, now I have done this the labels of all my gauges are cut off if they are more than one line. See the screenshot below:
I have tried to change the height/width of the column, div and svg using css, but I do not want the gauges larger and that is the only solution that has worked.
I've included below a reprex:
remotes::install_github("rstudio/flexdashboard")
library(shiny)
library(flexdashboard)
ui <- fluidPage(
column(12, gaugeOutput("gauge1")),
column(12, gaugeOutput("gauge2"))
)
server <- function(input, output) {
output$gauge1 <- renderGauge({
gauge(15, min=0, max=100, label="Line 1\n Line2")
})
output$gauge2 <- renderGauge({
gauge(25, min=0, max=100, label="Line 1\n Line2")
})
}
shinyApp(ui = ui, server = server)
Solution 1:[1]
The problem has been fixed as seen here: https://github.com/rstudio/flexdashboard/issues/388
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kate Chalmers |

