numericLegend {vfinputs} | R Documentation |
Create a numeric legend
Description
Create a color legend based on given data and palette or colors. Also passes on data- attributes for optional JS interaction.
Usage
numericLegend(
inputId,
label = NULL,
class = "",
n = 100,
minValue = NULL,
maxValue = NULL,
data = NULL,
colors = NULL,
palette = NULL,
options = NULL,
orient = "bottom",
size = 200,
thickness = 20,
offset = 0
)
Arguments
inputId |
The |
label |
Display label for the control, or |
class |
The CSS class of the input div element to match with any brush-defining functions. Default classes for brushes are either |
n |
Number of color strips in the legend. Default is |
minValue |
Minimum numeric value in the legend (can be higher the maximum for inverted scale). |
maxValue |
Maximum numeric value in the legend (can be lower the minimum for inverted scale). |
data |
Alternative vector to extract numeric minimum and maximum values. |
colors |
Colours to interpolate; must be a valid argument to
|
palette |
A function that outputs a list of colors |
options |
Configuration options for brush and scale. Use |
orient |
Orientation of the legend. Can be |
size |
Absolute length in pixels of the color bar; becomes width or height depending on value of |
thickness |
Absolute thickness in pixels of the color bar; opposite of size depending on value of |
offset |
Left offset for scale to allow long labels. Default is |
Value
A numeric color legend control that can be added to a UI definition
See Also
discreteColorFilter()
continuousColorFilter()
categoricalColorFilter()
Other base legend:
categoricalLegend()