0

This is the code that I am using to render a gauge in flexdashboard with a runtime: shiny :

`renderGauge({
        select <- reactive({
        input$select})
   call_data_f <- pbrCalls_Data %>%
        filter(pbrCalls_Data$village==select())
sum_table <- round(sum(call_data_f$status_match,na.rm = TRUE)/sum(complete.cases(call_data_f$status_match))*100)
gauge(sum_table, min = 0, max = 100, symbol = '%', gaugeSectors(
    success = c(75, 100), warning = c(40, 74), danger = c(0, 39)
  ))
})`

When I knit locally, the gauge appears correctly as shown below:

But after publishing to shinyapps.io, I can only see the 0, the %age and 100, no gauge:

  • You posted some server code here, still I cannot see any ui code. Please provide a minimal reproducible example. Thank you. – nilsole Sep 29 '16 at 13:43
  • @nilsole on flexdashboard, I did not use the ui & server codes. I just have this wrapped in a r code chunk. – Jonathan Munene Sep 29 '16 at 13:47
  • Well, this is hard to reproduce I guess. Have you tried to move `select <- reactive({input$select})` outside of the render function? Also, please consult the manual, pages 5-6 here: https://cran.r-project.org/web/packages/flexdashboard/flexdashboard.pdf And another page here: http://rmarkdown.rstudio.com/flexdashboard/shiny.html – nilsole Sep 29 '16 at 14:13
  • Also, check the shinyapps.io error log. – nilsole Sep 29 '16 at 14:14
  • Yes I tried all those, let me embed the code on the published app then share the link here. – Jonathan Munene Sep 29 '16 at 14:16
  • @nilsole, check on the source code for this app, row 190 to 255, I have 4 gauges. https://jmunene.shinyapps.io/flex_app/ – Jonathan Munene Sep 29 '16 at 14:20
  • thx, will do in a couple of hours from now ... ;) – nilsole Sep 29 '16 at 20:41

0 Answers0