Skip to content

[Feature]: The Dynamic Text menus offer a layer's count, sum, mean, least and greatest #3036

Done

Description

@jgregoriorincon

What problem does this solve?

A layout text can show a layer's figure (#2853, #2980), but its token, such as {sum:Cities:pop}, has to be typed by hand: the layer's and the field's names must be spelled exactly, and neither Dynamic Text menu says these tokens exist.

Proposed solution

A "Layer statistic" submenu in both menus: the Format pane's Insert Dynamic Text (adds the token to the selected text) and Publish › Text › Dynamic Text (adds a text holding the token). It lists each layer of the first map frame's map, with Count and, under each numeric field, Sum, Mean, Least and Greatest. Raster layers, graphics layers and names a token can't hold are not listed. With no map frame or no such layer, there is no section. The text graphics on a map don't get it.

Estimated scope

One shared submenu in the UI, tests and one sentence in the user guide. About 220 lines.

Alternatives considered

A dialog to pick layer, statistic and field: more clicks and more code than a submenu.

Activity

  1. jgregoriorincon commented on Nov 26, 2026

    @jgregoriorincon
    ContributorAuthor

    I'll take this.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions