Description Usage Arguments Value See Also
Create a color legend based on given data and palette or colors. Also passes on data- attributes for optional JS interaction.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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 |
A numeric color legend control that can be added to a UI definition
discreteColorFilter()
continuousColorFilter()
categoricalColorFilter()
Other base legend:
categoricalLegend()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.