Skip to content

Instantly share code, notes, and snippets.

@rpkyle
Created July 2, 2020 16:11
Show Gist options
  • Save rpkyle/247c631e4bf58feff5c930e380dae8d9 to your computer and use it in GitHub Desktop.
Save rpkyle/247c631e4bf58feff5c930e380dae8d9 to your computer and use it in GitHub Desktop.
dashCytoscape Demo for R
library(dash)
library(dashCytoscape)
library(dashHtmlComponents)
app <- Dash$new()
app$layout(
cytoCytoscape(
id='cytoscape-elements-boolean',
layout = list(name = 'preset'),
style = list(width = '100%', height = '400px'),
elements=list(
list(
data = list(id = 'one', label = 'Locked'),
position = list(x = 75, y = 75),
locked = TRUE
),
list(
data = list(id = 'two', label = 'Selected'),
position = list(x = 75, y = 200),
selected = TRUE
),
list(
data = list(id = 'three', label = 'Not Selectable'),
position = list(x = 200, y = 75),
selectable = FALSE
),
list(
data = list(id = 'four', label = 'Not Grabbable'),
position = list(x = 200, y = 200),
grabbable = FALSE
),
list(
data = list(source = 'one', target = 'two')
),
list(
data = list(source = 'two', target = 'three')
),
list(
data = list(source = 'three', target = 'four')
),
list(
data = list(source = 'two', target = 'four')
)
)
)
)
app$run_server()
@rpkyle
Copy link
Author

rpkyle commented Aug 25, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment