Adds a geometry to the registry. The optional_args field is the key
mechanism for user discoverability: it is what geom_args() prints, what
the Shiny app reads to build dynamic UI, and what automated documentation
can harvest without parsing source code.
Arguments
- name
Character. Unique geometry identifier.
- ggplot_fun
Function or
NULL.- highcharter_fun
Function or
NULL.- required_args
Named list of
list(default, desc). Args that MUST be supplied via...inhd_make(). Validation fails if any are missing.- optional_args
Named list of
list(default, desc). Args that MAY be supplied and have a sensible default when omitted. These are purely informational from the registry's perspective — the geom function applies the defaults itself viageom_params$key %||% default.- is_map_geom
Logical. Bypasses
base_fig()in both engines.
Details
Structure of optional_args:
A named list where each element is itself a list with two fields:
default — the value used when the arg is not supplied (may be NULL)
desc — a short human-readable description (shown by geom_args())
Example:
