Bug report #11718
When adding manually a categorized symbology class this is not ordered correctly when clicking on "value"
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||19956|
- open a vector
- make a categorized symbology using a interger/double column
- clicking on the "value" column you can order the classes as expected, desc/asc because are numbers
- manually delete one class
- add a new class and give it the value of the previously deleted one
- now when clicking "value" the new class takes and unpredictable position, and not anyway the expected one
it seems that the 'categorized' style builder assumes that column for styling data contains string values.
When the symbol classification is sorted by the Value column, string ordering is applied, not numeric.
For instance, integer categories 0-15 are ordered like: 0, 1, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9.
This makes it difficult to extend the range manually.
Is it possible to detect the data type and order appropriately?
best wishes - JS
#8 Updated by Giovanni Manghi almost 6 years ago
jeremy spurway wrote:
what happens if you click the 'Value' column to (re)order the data?
see attachments for what happens on my installation
if I click on "value" I still get the right order (asc or desc) if I click "legend" it orders it as text, because the legend is text.
#9 Updated by jeremy spurway almost 6 years ago
- File QGIS_vecStyCat_4.png added
- File QGIS_vecStyCat_6.png added
- File QGIS_vecStyCat_5.png added
- File QGIS_vecStyCat_3.png added
what happens if you add a new category, value =10, then order by value?
for me, it doesn't order numerically.
I tried creating a new layer, for a different shape file, and added a new value (=50).
Each time I click 'Value' column header, the '50' category ends up somewhere different - see attached.
#10 Updated by Giovanni Manghi almost 6 years ago
- Status changed from Feedback to Open
- Tracker changed from Feature request to Bug report
- Subject changed from vector style categorized does not detect numeric column to sort Values to When adding manually a categorized symbology class this is not ordered correctly when clicking on "value"
- Affected QGIS version set to master
- Crashes QGIS or corrupts data set to No
#12 Updated by Giovanni Manghi over 1 year ago
- Status changed from Open to Closed
- Resolution set to end of life
End of life notice: QGIS 2.18 LTR