#' example_module UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_example_module_ui <- function(id){
ns <- NS(id)
tagList(
sliderInput(inputId = ns("bars"),
label = "Number of bars:",
min = 1,
max = 20,
value = 10),
highcharter::highchartOutput(outputId = ns("distPlot"))
)
}
#' example_module Server Function
#'
#' @noRd
mod_example_module_server <- function(id){
moduleServer(id, function(input, output, session){
ns <- session$ns
output$distPlot <- highcharter::renderHighchart({
data <- data.frame(a = letters[1:20],b = c(1:20))
hgchmagic::hgch_bar_CatNum(data, slice_n = input$bars)
})
})
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.