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

timevis and visNetwork do not work together in the same app #11

Closed
daattali opened this issue Aug 30, 2016 · 1 comment
Closed

timevis and visNetwork do not work together in the same app #11

daattali opened this issue Aug 30, 2016 · 1 comment

Comments

@daattali
Copy link
Owner

They both use vis.js library so they are somehow conflicting with each other

Sample code:

library(timevis)
library(shiny)
library(visNetwork)

nodes <- data.frame(id = 1:3)
edges <- data.frame(from = c(1,2), to = c(1,3))

dataBasic <- data.frame(
  id = 1:4,
  content = c("Item one", "Item two" ,"Ranged item", "Item four"),
  start   = c("2016-01-10", "2016-01-11", "2016-01-20", "2016-02-14"),
  end    = c(NA, NA, "2016-02-04", NA)
)

ui<-fluidPage(
  timevisOutput('timeline'),
  visNetworkOutput('snagraph')
)

server<-function(input,output)({

  output$snagraph<-renderVisNetwork(visNetwork(nodes,edges))
  output$timeline<-renderTimevis(timevis(dataBasic)) 

}
)

shinyApp(ui,server)

@daattali
Copy link
Owner Author

this is also reported on visNetwork datastorm-open/visNetwork#90

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