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

Legend not updating dynamically when using an atlas #53442

Closed
1 of 2 tasks
NadegeOdonat opened this issue Jun 12, 2023 · 3 comments · Fixed by #56372
Closed
1 of 2 tasks

Legend not updating dynamically when using an atlas #53442

NadegeOdonat opened this issue Jun 12, 2023 · 3 comments · Fixed by #56372
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks

Comments

@NadegeOdonat
Copy link

NadegeOdonat commented Jun 12, 2023

What is the bug or the crash?

When inserting dynamic values in a symbology (in my case dyamic ranges for a color scale), the maps are behaving correctly. However when the legend is filled dynamically, either in the symbology or in the legend object directly on the map, the text displayed does not update, and keeps showing the ranges for the first atlas feature. The title is correctly refreshed, but the items legends stay stuck. Trying to force a refresh by applying a change (adding a space for example) doesn't do anything either.

(also, yes, I'm aware that it's bad practice to have the same color represent different ranges on similar maps, but I have good reasons to do so)

Steps to reproduce the issue

1. Create an atlas table (in my case in Open office). Here I put my data name (gp_tax), and three values to generate the ranges (s1, s2, s3)
Atlas fields

2. Create the symbology using the @atlas_feature attributes
Raw atlas layer

3. Create your map layout, generate an atlas, and add a legend. Make sure it's named dynamically (obviously)
Raw legend labels

4. Check how the legend look on the first feature. Everything looks just right
Legend on 1rst atlas item

5. Check how the legend look on the next features. While the map is behaving correctly and the legend title refresh properly, the items don't update and keep displaying the first ranges
Legend on 2nd atlas item

Versions

QGIS version
3.28.6-Firenze
QGIS code revision
868c9fa
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.6.4
PROJ version
9.2.0
EPSG Registry database version
v10.082 (2023-02-06)
GEOS version
3.11.2-CAPI-1.17.2
SQLite version
3.41.1
PDAL version
2.5.2
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009

Active Python plugins
dataexplorer
3.1.1
datagrandest
2.01
DataPlotly
4.0.0
lizmap
3.14.0
QuickOSM
2.2.0
db_manager
0.1.20
MetaSearch
0.3.6
processing
2.12.99
sagaprovider
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@NadegeOdonat NadegeOdonat added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jun 12, 2023
@DelazJ DelazJ added the Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks label Jun 12, 2023
@DelazJ
Copy link
Contributor

DelazJ commented Jun 12, 2023

And when you export, the output is as in the preview? Just wanted to check whether the issue is not only at preview level...

@DelazJ DelazJ added the Feedback Waiting on the submitter for answers label Jun 12, 2023
@NadegeOdonat
Copy link
Author

My bad, I should have included that. The exported maps show the correct legend, it is indeed just at preview level.

@DelazJ DelazJ removed the Feedback Waiting on the submitter for answers label Jun 12, 2023
@NadegeOdonat
Copy link
Author

I don't know what changed but today, on the same project with updated layers on a very similar atlas, the legend labels do not show any of the dynamic numbers, and neither does the pdf output.

image

I've checked in the assistant that the correct value is outputed by the expression, and it does.
image

I'm now a confused geomatician. And contrary to what I said earlier the bug is not just at preview level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
3 participants