diff --git a/R/helpers.R b/R/helpers.R index 17cbf01706..2f58d9dac5 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -597,6 +597,14 @@ currency <- function( #' `data_line_stroke_width` option. By default, a value of `4` (as in '4px') #' is used. #' +#' @param data_area_fill_color *Fill color for the data-point-bounded area* +#' +#' `scalar` // *default:* `NULL` (`optional`) +#' +#' The fill color for the area that bounds the data points in line plot. The +#' default is `"#FF0000"` (`"red"`) but can be changed by providing a color +#' value to `data_area_fill_color`. +#' #' @param data_bar_stroke_color *Color of a data bar's outside line* #' #' `scalar` // *default:* `NULL` (`optional`) @@ -787,6 +795,7 @@ nanoplot_options <- function( data_line_type = NULL, data_line_stroke_color = NULL, data_line_stroke_width = NULL, + data_area_fill_color = NULL, data_bar_stroke_color = NULL, data_bar_stroke_width = NULL, data_bar_fill_color = NULL, @@ -811,24 +820,26 @@ nanoplot_options <- function( currency = NULL ) { - data_point_radius <- data_point_radius %||% 10 + data_point_radius <- data_point_radius %||% 10 data_point_stroke_color <- data_point_stroke_color %||% "#FFFFFF" data_point_stroke_width <- data_point_stroke_width %||% 4 - data_point_fill_color <- data_point_fill_color %||% "#FF0000" + data_point_fill_color <- data_point_fill_color %||% "#FF0000" - data_line_type <- data_line_type %||% "curved" + data_line_type <- data_line_type %||% "curved" data_line_stroke_color <- data_line_stroke_color %||% "#4682B4" data_line_stroke_width <- data_line_stroke_width %||% 8 + data_area_fill_color <- data_area_fill_color %||% "#FF0000" + data_bar_stroke_color <- data_bar_stroke_color %||% "#3290CC" data_bar_stroke_width <- data_bar_stroke_width %||% 4 - data_bar_fill_color <- data_bar_fill_color %||% "#3FB5FF" + data_bar_fill_color <- data_bar_fill_color %||% "#3FB5FF" data_bar_negative_stroke_color <- data_bar_negative_stroke_color %||% "#CC3243" data_bar_negative_stroke_width <- data_bar_negative_stroke_width %||% 4 - data_bar_negative_fill_color <- data_bar_negative_fill_color %||% "#D75A68" + data_bar_negative_fill_color <- data_bar_negative_fill_color %||% "#D75A68" - reference_line_color <- reference_line_color %||% "#75A8B0" + reference_line_color <- reference_line_color %||% "#75A8B0" reference_area_fill_color <- reference_area_fill_color %||% "#A6E6F2" vertical_guide_stroke_color <- vertical_guide_stroke_color %||% "#911EB4" @@ -858,6 +869,7 @@ nanoplot_options <- function( data_line_type = data_line_type, data_line_stroke_color = data_line_stroke_color, data_line_stroke_width = data_line_stroke_width, + data_area_fill_color = data_area_fill_color, data_bar_stroke_color = data_bar_stroke_color, data_bar_stroke_width = data_bar_stroke_width, data_bar_fill_color = data_bar_fill_color, diff --git a/R/modify_columns.R b/R/modify_columns.R index 307bf8d1d1..ab8515ce70 100644 --- a/R/modify_columns.R +++ b/R/modify_columns.R @@ -2887,6 +2887,7 @@ cols_nanoplot <- function( data_point_fill_color = options_plots$data_point_fill_color, data_line_stroke_color = options_plots$data_line_stroke_color, data_line_stroke_width = options_plots$data_line_stroke_width, + data_area_fill_color = options_plots$data_area_fill_color, data_bar_stroke_color = options_plots$data_bar_stroke_color, data_bar_stroke_width = options_plots$data_bar_stroke_width, data_bar_fill_color = options_plots$data_bar_fill_color, diff --git a/R/utils_plots.R b/R/utils_plots.R index 0c75bc8b02..7d8871ca83 100644 --- a/R/utils_plots.R +++ b/R/utils_plots.R @@ -44,6 +44,7 @@ generate_nanoplot <- function( data_point_fill_color = "#FF0000", data_line_stroke_color = "#4682B4", data_line_stroke_width = 8, + data_area_fill_color = "#FF0000", data_bar_stroke_color = "#3290CC", data_bar_stroke_width = 4, data_bar_fill_color = "#3FB5FF", @@ -1856,7 +1857,7 @@ generate_nanoplot <- function( paste0( "} // \emph{default:} \code{NULL} (\code{optional}) + +The fill color for the area that bounds the data points in line plot. The +default is \code{"#FF0000"} (\code{"red"}) but can be changed by providing a color +value to \code{data_area_fill_color}.} + \item{data_bar_stroke_color}{\emph{Color of a data bar's outside line} \verb{scalar} // \emph{default:} \code{NULL} (\code{optional})