Server logic for scatterPlot module
Source:R/dittoViz_ScatterPlot_module_server.R
dittoViz_scatterPlotServer.RdServer logic for scatterPlot module
Usage
dittoViz_scatterPlotServer(
id,
data,
hide.inputs = NULL,
hide.tabs = NULL,
defaults = NULL,
fig.fn = NULL
)Arguments
- id
The ID for the Shiny module.
- data
A
reactivecontaining the data frame to plot. Values that are not data frames are coerced withas.data.frame(); aNULLvalue is treated as "not ready yet" and the module waits for data.- hide.inputs
A character vector of input IDs to hide. These will still be initialized and their values passed to the plot function, but the user will not be able to see/adjust them in the UI.
- hide.tabs
A character vector of tab names to hide. Inputs in these tabs will still be initialized and their values passed to the plot function, but the user will not be able to see/adjust them in the UI.
- defaults
A named list of default values for the inputs. When the reset button is clicked, inputs are reset to these values rather than hardcoded fallbacks. Typically the same list passed to the corresponding UI function. An entry may also be a
shiny::reactive()orshiny::reactiveVal(), in which case the input tracks it as the parent app's state changes; seesetup_reactive_defaults().- fig.fn
An optional function
function(fig, input, isolate_fn)returning the figure, for a wrapper module to add to or adjust the plot (extra layers, annotations, axis title text) before it is finalised. It runs in the figure's styling step (seeapply_uniform_styling()), after the legend is styled and before the axis titles become draggable annotations, so whatever it adds reaches the rendered plot, manual-edit persistence and the source download alike. It sees the finished plot, marginal distributions included. That step is not cached, so it can read any reactive value.inputis this module's input, which a wrapper sharing the module'sidalso writes its own inputs to. Read inputs asisolate_fn(input$key)so they respect the module's auto-update setting.