Skip to content
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

troubles plotting in shiny. #42

Open
picousse opened this issue Aug 13, 2018 · 0 comments
Open

troubles plotting in shiny. #42

picousse opened this issue Aug 13, 2018 · 0 comments

Comments

@picousse
Copy link

picousse commented Aug 13, 2018

i have code that works in terminal.
however if i want to put it in a shiny, the plots doesn't show.

ui.R file:

library(collapsibleTree)
iibrary(shiny)

ui <- fluidPage(

  # Application title
  titlePanel("Tree"),
  
  sidebarLayout(
    sidebarPanel(
      width = 2,
      textInput("tr", "tr (comma seperated): ", value = "xxxx", width = NULL, placeholder = NULL),
      
      actionButton(
        "tr_update",
        "Draw Tree",
        icon = NULL,
        width = NULL
      )
      
    ),
    mainPanel(
      collapsibleTreeOutput("d3", height = "700px")
    )
  )
)

server.r file



library(shiny)
library(inbioseR)
library(collapsibleTree)
require(data.tree)

# Define server logic required to draw a histogram
server <- function(input, output, session) {
  p <- eventReactive(input$tr_update, {

... code to create correct dataframe (which seems in order)    


t #final dataframe to return with a column, compare_str to be used as attribute
    
    
  })
  
  output$d3 <- renderCollapsibleTree({
    t <- p()
    collapsibleTreeNetwork(t,  collapsed = FALSE, linkLength=100, tooltipHtml = 'compare_str')
    })
  
}

why doesn't this show up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant