Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Introduce stacked diagrams (Request in QGIS) #9277

Open
qgis-bot opened this issue Sep 27, 2024 · 0 comments
Open

[feature] Introduce stacked diagrams (Request in QGIS) #9277

qgis-bot opened this issue Sep 27, 2024 · 0 comments
Labels
3.40 Symbology Refers to layer symbol properties
Milestone

Comments

@qgis-bot
Copy link
Collaborator

Request for documentation

From pull request qgis/QGIS#58568
Author: @gacarrillor
QGIS version: 3.40

[feature] Introduce stacked diagrams

PR Description:

This PR extends the QGIS diagram module allowing it to create and display stacked diagrams, i.e., diagrams located side by side. We've also taken the opportunity to move the diagram settings from a modal dialog to the Styling dock widget.

Stacked diagrams can be configured and displayed horizontally or vertically. The spacing between the so called subdiagrams can also be configured.

Stacked diagrams allow users to create complex diagrams like population pyramids.

Stacked diagrams can show mixed subdiagram types (e.g., a pie chart alongside a histogram) and users can add as many subdiagrams as they want. Moreover, subdiagrams can use different renderer types: e.g., one subdiagram could use a single category renderer, whereas the other could use a linearly interpolated one.

Subdiagrams can set their own size and their own legend settings (e.g., one subdiagram could show its categories in the legend, whereas another one could hide its own categories).

Subdiagram ordering is given by item ordering in the Stacked Diagram page's list. In the future, users could re-arrange subdiagram ordering by dragging and dropping subdiagrams (left as follow-up).

Note there are some shared settings like placement settings (e.g., over point), that the stacked diagram will take from its first subdiagram. Thus, other subdiagrams won't be able to set or change those specific settings, unless they become the first subdiagram in the stacked diagram. Therefore, when editing a subdiagram that is not located in the first place, we show labels to let users know why they don't see the expected widgets (e.g., placement ones) and where they can find them (i.e., in the first subdiagram).

GUI Stacked Diagrams

vokoscreenNG-2024-09-18_00-30-27.mp4

GUI Single Diagram

Before / After (click to see it in large size)
image

image

Other samples
(Note the corresponding point feature's geometry)

expected_stackedhistograms

expected_stackedpieshorizontalwithspacing

image

image

Mixed renderer type (pies using single category and histograms using linearly interpolated one):
expected_stackedpiehistogram

Nested stacked diagrams (just because we can! Not exposed through GUI, but possible in core and showcased via unit test):
expected_stackeddiagramsnested


Includes tests.

Additional fixes:

  • Fix #58501
  • Fix #58782

Funded by Landesamt für Vermessung und Geoinformation (LVG) Vorarlberg in collaboration with the QGIS user group Switzerland.

Commits tagged with [need-docs] or [FEATURE]

@github-actions github-actions bot added the 3.40 label Sep 27, 2024
@github-actions github-actions bot added this to the QGIS 3.40 milestone Sep 27, 2024
@roya0045 roya0045 added the Symbology Refers to layer symbol properties label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.40 Symbology Refers to layer symbol properties
Projects
None yet
Development

No branches or pull requests

2 participants