R/mod_sales_seasons.R

Defines functions mod_sales_seasons_server mod_sales_seasons_ui

#' sales_seasons UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
mod_sales_seasons_ui <- function(id){
  ns <- NS(id)
  tagList(
    shinydashboard::box(
      width = 12,
      fluidRow(
        column(
          width = 4,
          align = "center",
          plotOutput(ns("test_plot_2"))
        )
        
      )
    )
  )
}
    
#' sales_seasons Server Function
#'
#' @noRd 
mod_sales_seasons_server <- function(input, output, session, my_data){
  ns <- session$ns
 
  output$test_plot_2 <- renderPlot(
    my_data %>% ggplot2::ggplot(ggplot2::aes(x = Sepal.Length, y = Sepal.Width)) +
      ggplot2::geom_point()
  )
  
}
    
## To be copied in the UI
# mod_sales_seasons_ui("sales_seasons_ui_1")
    
## To be copied in the server
# callModule(mod_sales_seasons_server, "sales_seasons_ui_1")
 
kelly-stoltzman-consulting/theoffice documentation built on Jan. 6, 2021, 12:25 a.m.