If pickable == TRUE
, tooltip defines which columns (and their order) will be displayed
when an object is hovered. The tooltip will be displayed as a transposed table (1 row
per column) and is styled according to the rdeck()
theme
. The tooltip layout is inspired
by kepler.gl.
Tooltips support tidy-select expressions (renaming isn't supported and
will fail silently) and boolean expressions. Tidy-select support is limited when layer data
is
a URL or NULL
.
Similar to dplyr::select()
, names are interpreted as column / field names. Use the
injection operators to pass the value of a name from the environment,
e.g. !!my_column
.
Always supported
Tooltips support different arguments depending on the value of the layer data
, but the following
arguments are always supported:
NULL
|NA
|FALSE
-> no tooltipTRUE
-> all columns. This will be translated totidyselect::everything()
when data is a data frame or a tile json objectcharacter vector of column names, e.g.
c("foo", "bar")
a
c()
expression of bare names, e.g.c(foo, bar)
a bare name, e.g.
my_col
Data is a data.frame
or tile_json
object
When layer data
is a data.frame()
or tile_json()
object, tooltip
supports
tidy-select, including selection helpers. The following are some
examples of supported expressions:
c(foo, bar)
tidyselect::matches("foo")
,-unwanted
where(is.character) & matches("foo")
1:6
Like dplyr::select()
, referencing non-existent columns results in an error. Use
tidyselect::any_of()
to include columns that may not exist.
All geometry columns will be forcibly removed from the tooltip.