From 01a9bb7435bbe75a870c8720adbb7b7df308efda Mon Sep 17 00:00:00 2001 From: David Mawdsley Date: Wed, 8 Aug 2018 09:09:50 +0100 Subject: [PATCH] use fluidRow() layout --- worked_example/app.R | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/worked_example/app.R b/worked_example/app.R index 9673d3a..eb61b2a 100644 --- a/worked_example/app.R +++ b/worked_example/app.R @@ -19,31 +19,32 @@ ui <- fluidPage( # Application title titlePanel("Gapminder plot"), - - # Sidebar with a slider input for number of bins - sidebarLayout( - sidebarPanel( - sliderInput("year", - "Select year", - min = min(gapminder$year), - max = max(gapminder$year), - value = min(gapminder$year), - sep="", # Hide thousands , separator - step=1, # Select every year - animate = animationOptions(interval = 1250) - ), - checkboxGroupInput("continent", - "Select continents", - choices = levels(gapminder$continent), - selected = levels(gapminder$continent)) - ), - - # Show a plot of the generated distribution - mainPanel( + + fluidRow( + column(12, plotOutput("gapminderPlot", click="plotClick"), tableOutput("graphData"), verbatimTextOutput("clickData") ) + ), + fluidRow( + column(6, + sliderInput("year", + "Select year", + min = min(gapminder$year), + max = max(gapminder$year), + value = min(gapminder$year), + sep="", # Hide thousands , separator + step=1, # Select every year + animate = animationOptions(interval = 1250) + ) + ), + column(6, + checkboxGroupInput("continent", + "Select continents", + choices = levels(gapminder$continent), + selected = levels(gapminder$continent)) + ) ) )