| build_legend_data | R Documentation |
Creates the appropriate legend data structure based on whether the colour variable is numeric (continuous colorbar) or categorical (discrete legend).
build_legend_data(
is_numeric,
data_min,
data_max,
palette,
pal_colours,
colour_col,
label_col,
fill_col,
data
)
is_numeric |
Whether the colour variable is numeric |
data_min |
Minimum data value (for continuous) |
data_max |
Maximum data value (for continuous) |
palette |
Original palette specification |
pal_colours |
Processed palette colours |
colour_col |
Name of the colour column |
label_col |
Name of the label column |
fill_col |
Name of the fill column |
data |
Atlas data |
List with legend specification or NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.