inst/shiny/examples/4_communication/module/ScatterPlot.R

ScatterPlot <- R6::R6Class(
  "ScatterPlot", 
  inherit = BasePlot,
  public = list(
    chart = function(data, cols) {
      return(reactive({
        aes <- self$aes(cols())
        ggplot(data(), aes) +
          geom_point(aes(color = selected_)) +
          scale_color_manual(values = c("black", "#66D65C"), guide = FALSE)
      }))
    }
    
  )
)
xni7/tidymodules documentation built on Dec. 23, 2021, 7:10 p.m.