qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3.01k forks source link

Diagrams not showing when switching its type #46769

Closed joaquinmunoz closed 1 month ago

joaquinmunoz commented 2 years ago

What is the bug or the crash?

Diagrams not showing when switching its type

Steps to reproduce the issue

  1. Take a layer (polygon) with some features and numeric fields
  2. Open Layer Properties, and select Diagrams
  3. Choose 'Pie Chart' and add some numeric fields to 'Assigned attributes'
  4. Click Apply and OK
  1. Open again Layer Properties, and select Diagrams
  2. Choose 'Histogram' (or any diagram type)
  3. Click Apply and OK
  1. Open again Layer Properties, and select Diagrams
  2. Choose again 'Pie Chart'
  3. Click Apply and OK

Versions

QGIS version 3.22.2-Białowieża QGIS code revision 1601ec46d0
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version 12.3
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 11.6
       

Active Python plugins batch_gps_importer | version 1.0.1 QuickOSM | 2.0.0-beta3 freehandEditing3 | version 1.1.0 profiletool | 4.2.1 DataPlotly | 3.8.1 AzimuthMeasurement | 0.2.2 joinmultiplelines | Version 0.4.1 quick_map_services | 0.19.27 nominatim | 1.4.1 geometry_paster | 0.1.1 GeoCoding | 2.18 poiexport | 3.0.3 OSMDownloader | 1.0.3 openlayers_plugin | 2.0.0 trail_elevation_stats | 0.2 valuetool | 3.0.15 mmqgis | 2021.9.10 Spanish_Inspire_Catastral_Downloader | 1.1 Mergin | 2021.5.1 BufferByPercentage | 0.3.3 processing | 2.12.99 sagaprovider | 2.12.99 grassprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.5

Supported QGIS version

New profile

Additional context

No response

roya0045 commented 2 years ago

I can confirm on windows too. Though I'm unsure what causes this...

roya0045 commented 2 years ago

Ok, it seems that using histogram is the faulty one. Switching between others is fine (though the stacked bars is broken and shows empty space with many categories).

roya0045 commented 2 years ago

@nyalldawson I've looked into this and what I found up to now is that the mLabels stored in qgslabelingenging are deleted when switching to the histogram and never get repopulated.

I'll keep digging but if you have a clue or a hint feel free to let me know as I'm not familiar with pal.

Update1: when defining the PAL problem, pal-extract doesn't get any features. And the empty list seem to be the root issue.

roya0045 commented 2 years ago

Ok, it's the interpolation settings that get corrupted as it seems to be a one way change.

roya0045 commented 2 years ago

Ok found the issue, seems to be a big UX/UI issue. I'll try to come up with a PR to fix this.

gacarrillor commented 2 months ago

@joaquinmunoz, histograms need that you define a maximum field value on your own and an associated bar length to apply a linear interpolation for the rest of the values.

This will happen even if you don't set the Pie diagram in the first place (steps 3 and 4 in your description).

I wouldn't necessarily consider this a bug, would you @joaquinmunoz?

github-actions[bot] commented 2 months ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

github-actions[bot] commented 1 month ago

While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. Or, if you have any further questions, there are also further support channels that can help you.