|
| 1 | +#' Shared parameters documentation |
| 2 | +#' |
| 3 | +#' Defines common arguments shared across multiple functions in the package |
| 4 | +#' to avoid repetition by using `inheritParams`. |
| 5 | +#' |
| 6 | +#' @param plot_height (`numeric`) optional, specifies the plot height as a three-element vector of |
| 7 | +#' `value`, `min`, and `max` intended for use with a slider UI element. |
| 8 | +#' @param plot_width (`numeric`) optional, specifies the plot width as a three-element vector of |
| 9 | +#' `value`, `min`, and `max` for a slider encoding the plot width. |
| 10 | +#' @param rotate_xaxis_labels (`logical`) optional, whether to rotate plot X axis labels. Does not |
| 11 | +#' rotate by default (`FALSE`). |
| 12 | +#' @param ggtheme (`character`) optional, `ggplot2` theme to be used by default. Defaults to `"gray"`. |
| 13 | +#' @param ggplot2_args (`ggplot2_args`) object created by [teal.widgets::ggplot2_args()] |
| 14 | +#' with settings for the module plot. |
| 15 | +#' The argument is merged with options variable `teal.ggplot2_args` and default module setup. |
| 16 | +#' |
| 17 | +#' For more details see the vignette: `vignette("custom-ggplot2-arguments", package = "teal.widgets")` |
| 18 | +#' @param basic_table_args (`basic_table_args`) object created by [teal.widgets::basic_table_args()] |
| 19 | +#' with settings for the module table. |
| 20 | +#' The argument is merged with options variable `teal.basic_table_args` and default module setup. |
| 21 | +#' |
| 22 | +#' For more details see the vignette: `vignette("custom-basic-table-arguments", package = "teal.widgets")` |
| 23 | +#' @param pre_output (`shiny.tag`) optional, text or UI element to be displayed before the module's output, |
| 24 | +#' providing context or a title. |
| 25 | +#' with text placed before the output to put the output into context. For example a title. |
| 26 | +#' @param post_output (`shiny.tag`) optional, text or UI element to be displayed after the module's output, |
| 27 | +#' adding context or further instructions. Elements like `shiny::helpText()` are useful. |
| 28 | +#' @param alpha (`integer(1)` or `integer(3)`) optional, specifies point opacity. |
| 29 | +#' - When the length of `alpha` is one: the plot points will have a fixed opacity. |
| 30 | +#' - When the length of `alpha` is three: the plot points opacity are dynamically adjusted based on |
| 31 | +#' vector of `value`, `min`, and `max`. |
| 32 | +#' @param size (`integer(1)` or `integer(3)`) optional, specifies point size. |
| 33 | +#' - When the length of `size` is one: the plot point sizes will have a fixed size. |
| 34 | +#' - When the length of `size` is three: the plot points size are dynamically adjusted based on |
| 35 | +#' vector of `value`, `min`, and `max`. |
| 36 | +#' @param decorators `r lifecycle::badge("experimental")` |
| 37 | +#' (named `list` of lists of `teal_transform_module`) optional, |
| 38 | +#' decorator for tables or plots included in the module output reported. |
| 39 | +#' The decorators are applied to the respective output objects. |
| 40 | +#' |
| 41 | +#' @param table_datanames (`character`) names of the datasets which should be listed below the plot |
| 42 | +#' when some data points are selected. Objects named after `table_datanames` will be pulled from |
| 43 | +#' `data` so it is important that data actually contains these datasets. Please be aware that |
| 44 | +#' table datasets must be linked with `plot_dataname` by the relevant [join_keys()]. |
| 45 | +#' See section "Decorating Module" below for more details. |
| 46 | +#' |
| 47 | +#' @return Object of class `teal_module` to be used in `teal` applications. |
| 48 | +#' |
| 49 | +#' @name shared_params |
| 50 | +#' @keywords internal |
| 51 | +NULL |
| 52 | + |
1 | 53 | #' Add labels for facets to a `ggplot2` object |
2 | 54 | #' |
3 | 55 | #' Enhances a `ggplot2` plot by adding labels that describe |
@@ -411,12 +463,3 @@ set_chunk_dims <- function(pws, q_r, inner_classes = NULL) { |
411 | 463 | q |
412 | 464 | }) |
413 | 465 | } |
414 | | - |
415 | | -.update_cs_input <- function(inputId, data, cs) { |
416 | | - if (!missing(data) && !length(names(cs))) { |
417 | | - labels <- teal.data::col_labels(isolate(data()))[cs$choices] |
418 | | - names(cs$choices) <- labels |
419 | | - } |
420 | | - updateSelectInput(inputId = inputId, choices = cs$choices, selected = cs$selected) |
421 | | - if (length(cs$choices) < 2) shinyjs::hide(inputId) |
422 | | -} |
|
0 commit comments