From ee6be0314f1584c55e2f4f90f09fafc2be40074f Mon Sep 17 00:00:00 2001 From: Anthony North Date: Tue, 24 Oct 2023 04:40:38 +0000 Subject: [PATCH] accessor, scale, tooltip doco --- R/doc-proptypes.R | 13 ++++++++----- man/accessor.Rd | 8 ++++++-- man/scale.Rd | 7 +++++-- man/tooltip.Rd | 2 +- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/R/doc-proptypes.R b/R/doc-proptypes.R index 1b21b8d1..d06bd067 100644 --- a/R/doc-proptypes.R +++ b/R/doc-proptypes.R @@ -1,8 +1,10 @@ #' Prop Type: Accessor #' #' @description -#' Accessors map `data` columns to visual representations, primarily colours: `fill`, `line`, -#' `highlight` and sizes: `radius`, `elevation`, `width`, `height`. +#' Accessors map `data` columns to visual representations, primarily: +#' - colours: `fill`, `line`, `highlight` +#' - sizes: `radius`, `elevation`, `width`, `height` +#' - geometries `point/multipoint`, `linestring/multilinestring`, `polygon/multipolygon` #' #' On the client, an accessor is translated to a javascript function that retrieves the specified #' column values for each rendered feature. An equivalent R function would look something like @@ -58,8 +60,9 @@ NULL #' Prop Type: Scale #' #' @description -#' Scales transform input data into visual representations, predominantly colours: -#' `fill`, `line`, `highlight` and sizes: `radius`, `elevation`, `width`, `height`. +#' Scales transform input data into visual representations, predominantly: +#' - colours: `fill`, `line`, `highlight` +#' - sizes: `radius`, `elevation`, `width`, `height` #' #' Transformations are performed in client-side javascript, thus scales have very minimal #' file-size overhead; what you pay for is the source data being scaled & the scale descriptor @@ -158,7 +161,7 @@ NULL #' Like [dplyr::select()], referencing non-existent columns results in an error. Use #' [tidyselect::any_of()] to include columns that may not exist. #' -#' All `sf` columns will be forcibly removed from the tooltip. +#' All geometry columns will be forcibly removed from the tooltip. #' #' # Data is a `string` or `NULL` #' There is no column / field name validation when When layer `data` is a `string` (interpreted as a URL) diff --git a/man/accessor.Rd b/man/accessor.Rd index 948fd4a8..dd74f1b6 100644 --- a/man/accessor.Rd +++ b/man/accessor.Rd @@ -4,8 +4,12 @@ \alias{accessor} \title{Prop Type: Accessor} \description{ -Accessors map \code{data} columns to visual representations, primarily colours: \code{fill}, \code{line}, -\code{highlight} and sizes: \code{radius}, \code{elevation}, \code{width}, \code{height}. +Accessors map \code{data} columns to visual representations, primarily: +\itemize{ +\item colours: \code{fill}, \code{line}, \code{highlight} +\item sizes: \code{radius}, \code{elevation}, \code{width}, \code{height} +\item geometries \code{point/multipoint}, \code{linestring/multilinestring}, \code{polygon/multipolygon} +} On the client, an accessor is translated to a javascript function that retrieves the specified column values for each rendered feature. An equivalent R function would look something like diff --git a/man/scale.Rd b/man/scale.Rd index a6955ded..dbd41613 100644 --- a/man/scale.Rd +++ b/man/scale.Rd @@ -4,8 +4,11 @@ \alias{scale} \title{Prop Type: Scale} \description{ -Scales transform input data into visual representations, predominantly colours: -\code{fill}, \code{line}, \code{highlight} and sizes: \code{radius}, \code{elevation}, \code{width}, \code{height}. +Scales transform input data into visual representations, predominantly: +\itemize{ +\item colours: \code{fill}, \code{line}, \code{highlight} +\item sizes: \code{radius}, \code{elevation}, \code{width}, \code{height} +} Transformations are performed in client-side javascript, thus scales have very minimal file-size overhead; what you pay for is the source data being scaled & the scale descriptor diff --git a/man/tooltip.Rd b/man/tooltip.Rd index eadc4e0b..00dcc9bf 100644 --- a/man/tooltip.Rd +++ b/man/tooltip.Rd @@ -52,7 +52,7 @@ examples of supported expressions: Like \code{\link[dplyr:select]{dplyr::select()}}, referencing non-existent columns results in an error. Use \code{\link[tidyselect:all_of]{tidyselect::any_of()}} to include columns that may not exist. -All \code{sf} columns will be forcibly removed from the tooltip. +All geometry columns will be forcibly removed from the tooltip. } \section{Data is a \code{string} or \code{NULL}}{