Closed SNaveenMathew closed 3 years ago
Hi @SNaveenMathew, it sound like it is an issue with your reactive element. Please produce a minimal version based on the code below. This works fine add your reactive code until it does not work then I can attempt to debug:
library(shiny)
library(c3)
ui <- fluidPage(
c3Output("plot")
)
server <- function(input, output) {
output$plot <- renderC3({
data.frame(x=10, y=10) %>%
c3() %>%
#c3_pie()
c3_gauge()
})
}
shinyApp(ui = ui, server = server)
My apologies, I'm not able to produce a minimal reproducible example. I went with the temporary fix - I changed the type of chart from
I will reopen this issue if I find a more concrete explanation.
Disclaimer: I'm unable to produce 'reproducible' code because of the following reasons:
c3_pie
works butc3_gauge
does notc3_gauge
works butc3_pie
does notDefinition: "not working": svg is created and rendered in the browser, but it is blank
The input types for charts are:
Summary of attempts, successes and failures:
The input to charts is a
reactiveValues
object that updates based on user's inputs. In both cases I'm usingc3::c3Output(...)
and defined a suitableoutput$... <- c3::renderC3({ ... })
. To be safe I avoided using%>%
and returnedc3_pie()
orc3_gauge
object. I saved (cached) the data frame used for plotting, read it in R and plotted (c3_gauge or c3_pie) - it worked as expected. I also observed that replacing the dynamic data with static data (Eg:data.frame(x=10, y=10)
) makes the plot appear in R shiny. I experimented a bit more and found that there is no clear relationship between the type of data (reactive or static) and the behavior of the R shiny output.Is there a universal fix for this problem?