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
)List with legend specification or NULL
Whether the colour variable is numeric
Minimum data value (for continuous)
Maximum data value (for continuous)
Original palette specification
Processed palette colours
Name of the colour column
Name of the label column
Name of the fill column
Atlas data