Created
March 22, 2018 21:43
-
-
Save reisner/8611d10426d27a5ef9687d78f027ff93 to your computer and use it in GitHub Desktop.
Scatter D3 Javascript Error Demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server <- function(input, output) { | |
output$force <- networkD3::renderForceNetwork({ | |
networkD3::forceNetwork(Links = networkD3::MisLinks, Nodes = networkD3::MisNodes, | |
Source = "source", Target = "target", Value = "value", | |
NodeID = "name", Group = "group") | |
}) | |
output$scatterPlot <- scatterD3::renderScatterD3({ | |
scatterD3::scatterD3(x = c(1,2,3,4), | |
y = c(3,1,3,1), | |
#legend_width = 0, # UNCOMMENT THIS TO AVOID JS ERROR | |
col_var = c("In", "In", "Out", "In"), | |
colors = c("Out" = "#53777A", "In" = "#C02942")) | |
}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fluidPage( | |
titlePanel("Sample scatterD3 shiny app"), | |
mainPanel( | |
networkD3::forceNetworkOutput("force"), | |
scatterD3::scatterD3Output("scatterPlot", width = "100%", height = "600px") | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment