Closed karlmakepeace closed 1 year ago
It would be great if there were a vignette (or other/more documentation) showing the crosstalk functionality of this package.
crosstalk
User story
I made a brief Shiny example to test crosstalk with upsetjs out:
upsetjs
library(shiny) library(upsetjs) library(crosstalk) listInput <- list( one = c(1, 2, 3, 5, 7, 8, 11, 12, 13), two = c(1, 2, 4, 5, 10), three = c(1, 5, 6, 7, 8, 9, 10, 12, 13) ) shared_listInput <- crosstalk::SharedData$new(listInput) # create `crosstalk` R6 object ui <- fluidPage( titlePanel("UpSet.js Shiny `crosstalk` Example"), upsetjsOutput("upsetjs_upset"), upsetjsOutput("upsetjs_euler"), upsetjsOutput("upsetjs_venn"), upsetjsOutput("upsetjs_karnaugh"), ) server <- function(input, output, session) { shared.mode <- "hover" # otherwise default is "click" output$upsetjs_upset <- renderUpsetjs({ upsetjs() %>% fromList(listInput, shared.mode = shared.mode, shared = shared_listInput ) %>% interactiveChart() }) output$upsetjs_euler <- renderUpsetjs({ upsetjsEulerDiagram() %>% fromList(listInput, shared.mode = shared.mode, shared = shared_listInput ) %>% interactiveChart() }) output$upsetjs_venn <- renderUpsetjs({ upsetjsVennDiagram() %>% fromList(listInput, shared.mode = shared.mode, shared = shared_listInput ) %>% interactiveChart() }) output$upsetjs_karnaugh <- renderUpsetjs({ upsetjsKarnaughMap() %>% fromList(listInput, shared.mode = shared.mode, shared = shared_listInput ) %>% interactiveChart() }) } # Run the application shinyApp(ui = ui, server = server)
Including this or something similar may be helpful to users of your package. Thank you!
thx will integrate it
note there is also an existing example at https://github.com/upsetjs/upsetjs_r/blob/main/shiny/crosstalk.R
It would be great if there were a vignette (or other/more documentation) showing the
crosstalk
functionality of this package.User story
I made a brief Shiny example to test
crosstalk
withupsetjs
out:Including this or something similar may be helpful to users of your package. Thank you!