Skip to content

Commit

Permalink
accessor, scale, tooltip doco
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonynorth committed Oct 24, 2023
1 parent 25ef41f commit ee6be03
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
13 changes: 8 additions & 5 deletions R/doc-proptypes.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions man/accessor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions man/scale.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tooltip.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee6be03

Please sign in to comment.