-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Shiny click events #362
Conversation
Codecov Report
@@ Coverage Diff @@
## master #362 +/- ##
=======================================
Coverage 80.69% 80.69%
=======================================
Files 244 244
Lines 14321 14321
=======================================
Hits 11557 11557
Misses 2764 2764 Continue to review full report at Codecov.
|
Thank you, this is great! |
Hello Rich Iannone! I have a shiny app with multiple clickable graphs however when I use input$dg1_click$nodeValues, or input$dg2_click$nodeValues it returns the clicked values for both in the list. Any way around this? Thanks! Looks like there could be some problem in the code below checking the widget ID, meaning that the rshiny app cant differentiate between different diagrams clicked nodes. |
txt_A378 <- reactive({ output$print_A378 <- renderPrint({ I have this duplicated for multiple graphs but nodeValues always returns the same thing. |
Could you maybe come up with a small reproducible example? |
ui <- tabPanel("A358 Memory T-Cell panel", server <- function(input, output, session) {
txt <- reactive({
}) output$print <- renderPrint({ output$diagram_A167 <- renderGrViz({
txt_A167 <- reactive({ output$print_A167 <- renderPrint({
}) ######################################### When i click the top node of diagram i get this from print: |
this is great, am I correct in thinking this only works for nodes, not edges? |
yes exactly, it only works for the nodes currently. |
I am trying to update name of node label which I have selected but its not working ui <- fluidPage( server <- function(input, output, session) { output$dg <- renderGrViz({ observeEvent(input$update_label, { txt <- reactive({ output$print <- renderPrint({ shinyApp(ui, server) |
@akshaytuptewar19 Example
|
i am creating separate input box for changing node label name can we update node name by clicking on it only without creating input box separately? |
This addresses #290
For now a click on a node, creates a Shiny input object with node id and the text content. It would be nice to have some highlighting options too. But I hope this will do as a start.
Here's a test shiny-app: