Skip to content

Support interactive legends for match_expr()-based layers in add_legend() #197

Description

@danielvartan

add_legend(interactive = TRUE) currently requires classification to be a mapgl_classification object. This prevents interactive legends when a layer is styled with match_expr(), even though match_expr() is a common and valid way to map feature IDs to colors.

I prepared a reproducible example to show what I mean. The code is available here, with an interactive report here.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions