You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: I'm unable to produce 'reproducible' code because of the following reasons:
In one R shiny app c3_pie works but c3_gauge does not
In another R shiny app c3_gauge works but c3_pie does not
In another R shiny app neither of these work
Definition: "not working": svg is created and rendered in the browser, but it is blank
The input types for charts are:
c3_pie: data frame with 1 row and several columns
c3_gauge: data frame with 1 row and 1 column
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 using c3::c3Output(...) and defined a suitable output$... <- c3::renderC3({ ... }). To be safe I avoided using %>% and returned c3_pie() or c3_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?
The text was updated successfully, but these errors were encountered:
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:
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?
The text was updated successfully, but these errors were encountered: