categoricalLegend {vfinputs} | R Documentation |
Create a categorical legend
Description
Create a color legend based on given data and palette or colors. Also passes on data- attributes for optional JS interaction.
Usage
categoricalLegend(
inputId,
label = NULL,
class = "",
values = NULL,
data = NULL,
colors = NULL,
palette = NULL,
orient = "bottom",
size = 220,
multiple = TRUE
)
Arguments
inputId |
The |
label |
Display label for the control, or |
class |
The CSS class of the input div element to match with any filter toggling functions. Default class is |
values |
List of character vectors that will match with the colors or palette in the order provided by both. |
data |
Alternative vector to extract values with |
colors |
Colours to match with values; must be a valid argument to
|
palette |
A function that outputs a list of colors. |
orient |
Orientation of the legend. Can be |
size |
Absolute length in pixels of the color bar; becomes width or height depending on value of |
multiple |
Is selection of multiple items allowed? Default is |
Value
A categorical color legend control that can be added to a UI definition
See Also
discreteColorFilter()
continuousColorFilter()
categoricalColorFilter()
Other base legend:
numericLegend()