This checklist walks through how to add a new plotting module to vizModules so it matches the package’s organization, documentation, and testing standards.
Quick Checklist
-
- For dittoViz functions: use
dittoViz_<PlotName>(e.g.,dittoViz_ScatterPlotfordittoViz::scatterPlot) - For plotthis functions: use
plotthis_<PlotName>(e.g.,plotthis_AreaPlotforplotthis::AreaPlot) - For custom/standalone functions: use the plot name
directly (e.g.,
linePlot,piePlot)
- For dittoViz functions: use
-
-
@section Plot parameters not implemented or with altered functionality:- List inputs not exposed and why -
@section Plot parameters and defaults:- Document all exposed parameters with UI labels and defaults -
@section Plot parameters implementing new functionality:- Document any new or plotly-specific controls (axes, ticks, reference lines, etc)
-
Naming & Organization
-
-
dittoViz wrappers:
dittoViz_<PlotName>_module_ui.R(e.g.,dittoViz_scatterPlot_module_ui.R) -
plotthis wrappers:
plotthis_<PlotName>_module_ui.R(e.g.,plotthis_AreaPlot_module_ui.R) -
Custom modules:
<plotName>_module_ui.R(e.g.,linePlot_module_ui.R)
-
dittoViz wrappers:
Documentation Standards
1.
@section Plot parameters not implemented or with altered functionality:
List all parameters from the base plot function that are not exposed via UI inputs, with explanations:
#' @section Plot parameters not implemented or with altered functionality:
#' The following [plotthis::AreaPlot()] parameters are not available via UI inputs:
#' \itemize{
#' \item \code{xlab} - X-axis label (plotly allows interactive editing)
#' \item \code{ylab} - Y-axis label (plotly allows interactive editing)
#' \item \code{title} - Plot title (plotly allows interactive editing)
#' \item \code{subtitle} - Plot subtitle (not supported in plotly)
#' \item \code{legend.position} - Legend positioning (plotly allows interactive repositioning)
#' \item \code{split_by} - Split variable (returns a patchwork object, not supported in plotly)
#' \item \code{palette} - Managed internally via the palette selection UI
#' }2. @section Plot parameters and defaults:
Document all parameters that are exposed, listing their UI label and default value:
#' @section Plot parameters and defaults:
#' The following [plotthis::AreaPlot()] parameters can be accessed via UI inputs and/or the \code{defaults} argument:
#' \itemize{
#' \item \code{x} - X-axis variable (UI: "X values", default: 2nd categorical variable)
#' \item \code{y} - Y-axis variable (UI: "Y values", default: 2nd numeric variable)
#' \item \code{group_by} - Grouping variable (UI: "Group by", default: 3rd categorical variable or "")
#' \item \code{facet_by} - Faceting variable (UI: "Facet by", default: "")
#' \item \code{theme} - ggplot2 theme (UI: "Theme", default: "theme_this")
#' \item \code{alpha} - Area fill transparency (UI: "Alpha", default: 1)
#' }3.
@section Plot parameters implementing new functionality:
Document all module-specific parameters (plotly controls, reference lines, etc.):
#' The following parameters implementing new functionality or controlling plotly-specific features are also available:
#' \itemize{
#' \item \code{axis.font.size} - Axis title font size (UI: "Axis font size", default: 18)
#' \item \code{axis.showline} - Show axis border lines (UI: "Show axis lines", default: TRUE)
#' \item \code{axis.tickfont.size} - Size of tick labels (UI: "Tick label size", default: 12)
#' \item \code{hline.intercepts} - Y-coordinates for horizontal reference lines (UI: "Y-intercepts", default: "")
#' \item \code{hline.colors} - Colors for horizontal lines, comma-separated (UI: "Colors", default: "#000000")
#' \item \code{hline.linetypes} - Line types for horizontal lines, comma-separated (UI: "Line types", default: "dashed")
#' \item \code{vline.intercepts} - X-coordinates for vertical reference lines (UI: "X-intercepts", default: "")
#' \item \code{abline.slopes} - Slopes for diagonal reference lines (UI: "Slopes", default: "")
#' }Note: Reference line parameters
(hline.*, vline.*, abline.*)
accept comma-separated values to control each line individually.