update

fun update(legend: Legend)

Updates the data of an existing legend without changing its position in the UI.

This is typically used when the underlying data source (e.g., a weather layer) changes its range or units, requiring the visual scale to refresh.

Parameters

legend

The updated legend instance.