Create a qualitative legend. `legend_scale`` accepts scales listed in d3-scale.

legend_sequential(
  variable_name,
  legend_scale = "scaleLinear",
  color_low = "white",
  color_high = "green",
  color_no_data = "lightgrey"
)

Arguments

variable_name

string, name of the variable of this legend.

legend_scale

string, type of legend scale, must be the name of a d3 scale. Default: "scaleLinear".

color_low

string, color for the lowest value of the legend.

color_high

string, color for the highest value of the legend.

color_no_data

string, color for no data entries.