datastorm-open / visNetwork

R package, using vis.js library for network visualization
Other
544 stars 126 forks source link

Automatically open rules on a node pop-up? #431

Open vspinu opened 2 years ago

vspinu commented 2 years ago

Is there a way to automatically open the "Rule" popup without the need to click on the Rules link within the popup?

Thanks!

image

TitouanRobert commented 2 years ago

Hi,

Good proposal, done on branch (dev_visTree_tooltips)

devtools::install_github("datastorm-open/visNetwork",
                         ref = "dev_visTree_tooltips")
library(visNetwork)
library(rpart)
# Basic classification tree
res <- rpart(Species~., data=iris)
visTree(res, data = iris, main = "Iris classification Tree")
visTree(res, data = iris, main = "Iris classification Tree", defaultOpenRules = TRUE, defaultOpenDetails = TRUE)
vspinu commented 2 years ago

@TitouanRobert Can this be merged?

Sorry if you were waiting for an input on it. I got derailed on another project and was not bothered with the issue for a while.

I have now tried the branch and it works exactly as desired. Thanks!