dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.76k stars 228 forks source link

Esquisse module in flexdashboard with shiny is not rendering #160

Open lodderig opened 3 years ago

lodderig commented 3 years ago

I tried to adapt the example of the esquisse module for shiny to a flexdashboard with shiny but the plots are not rendering. It reads the column names but it does not update the chart selection nor does it render a plot.

see https://stackoverflow.com/questions/67284944/ggplot-plot-from-esquisse-package-not-rendering-in-flexdashboard

pvictor commented 3 years ago

That's weird, this seems specific to flexdashboard It looks like shiny thinks that the graph is not displayed on the screen and therefore does not do the reactive calculation... maybe due to some CSS...

Edouard-Legoupil commented 2 years ago

Hi, @lodderig Did you found a solution? @pvictor - Would be awesome if you could provide a working example

lstehlik2809 commented 2 years ago

@lodderig, @Edouard-Legoupil, I have put esquisse_ui() function into renderUI() function and it works fine. Give it a try.

Full example:

esqSData <- reactiveValues(data = mydata, name = "My Data")

esquisse_server(
  id = "esquisse",
  data_rv = esqSData,
  import_from = c("env", "file", "copypaste", "googlesheets") )

renderUI(
  esquisse_ui(
    id = "esquisse",
    header = TRUE,
    container = esquisseContainer(),
    controls = c("labs", "parameters", "appearance", "filters", "code"),
    insert_code = FALSE
    )
)