Closed julianstanley closed 4 years ago
vis.js
use HTML canvas for rendering, and I think it's not possible to use/set other configuration
Yep, that makes sense. I suppose I can expose my graph's data for testing by setting it to the window on render:
output$my_graph <- renderVisNetwork({
visNetwork(
nodes = data.frame(id = "A", label = "A")
) %>%
onRender("(el, x) => {window.myData = x}")
})
and, besides that, I'll just work on the tricks associated with automating canvas testing.
Thanks!
Right now, the visNetwork graph is all within a
<canvas>
tag. Is it feasible to expose elements within the graph to the DOM?I'm asking about this feature to make it possible to test visNetwork plots with tools like Selenium (or even
shinytest
, which I don't think is able to interact with visNetwork at all at this time).