Problem/Motivation

At the moment the only way to add custom Labels/Values for each Legend class is based on the implementation of
leaflet_choropleth_color_scale_alter hook, defined here:
https://git.drupalcode.org/project/leaflet_choropleth/-/blob/1.0.x/src/P...
and documented in leaflet_choropleth.api.php

To make all this more user friendly, also for (no coders) site builders, we could add a new Leaflet Choropleth settings section specifically focusing on the multivalue text inputs of Legend %value(s), according to the number of classes.

Legend

Proposed resolution

Add a new Leaflet Choropleth settings section/element that allows dynamic input of Legend text %value(s).
This new section would be a multivalue texts element that would dynamic (via Ajax) adjust its number of items (granularity) according the chosen Choropleth classification classes.

API changes

Data model changes

CommentFileSizeAuthor
#6 Screenshot 2025-10-02 at 00.45.34.jpg318.84 KBitamair

Comments

itamair created an issue. See original summary.

itamair’s picture

Title: Input custom Choropleth values, according to chosen number of classes » Input custom Choropleth Legend %value(s), according to chosen number of classes

  • itamair committed f7316dd3 on 1.0.x
    [#3549862] feat: Input custom Choropleth Legend %value(s), according to...
itamair’s picture

Status: Active » Fixed

leaflet_choropleth 1.0.6 release implements/accomplishes all this.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

itamair’s picture

StatusFileSize
new318.84 KB
ressa’s picture

Issue summary: View changes

Thanks for adding this feature @itamair, and also for including an image -- I am inserting it in the Issue Summary.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.