Skip to content

Commit

Permalink
interactive plots work
Browse files Browse the repository at this point in the history
  • Loading branch information
kpatel427 committed Sep 18, 2019
1 parent 23bdeea commit ee4635f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
12 changes: 12 additions & 0 deletions app/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,18 @@ server = function(input, output, session) {
})
})


output$plotly <- renderPlotly({
if (is.null(list_both$plot)) return()
isolate({
q <- ggplotly(list_both$plot)
q
})
})




#6. Final RenderText Code for GGPLOT----------------------
output$clip <- renderUI({
rclipButton("clipbtn", "Copy", list_both$code, icon("clipboard"))
Expand Down
12 changes: 11 additions & 1 deletion app/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,17 @@ ui <- dashboardPage(
icon = icon("sliders"),
block = TRUE
)),
withSpinner(plotOutput('plot',height = '650px'),color = '#3c8dbc'),
#withSpinner(plotOutput('plot',height = '650px'),color = '#3c8dbc'),

conditionalPanel(
condition = 'input.interact == true',
withSpinner(plotlyOutput('plotly',height = '650px'),color = '#3c8dbc')
),

conditionalPanel(
condition = 'input.interact == false',
withSpinner(plotOutput('plot',height = '650px'),color = '#3c8dbc')
),

value = 'plot6',status = "primary"

Expand Down

0 comments on commit ee4635f

Please sign in to comment.