Feature request #2816

Allow class rearrangement in the Layer Properties->Style and in the Layers panel.

Added by tdeleus - almost 7 years ago. Updated over 4 years ago.

Status:Closed Start Date:
Priority:Normal Due date:
Assigned to:Radim Blazek % Done:


Target version:Future Release - Nice to have
Platform:All Resolution:fixed
Platform version: Pull Request or Patch supplied:No
Status info:0 Tag:


I am using the new symbology editor.
I have a line vector layer from GRASS which represents roads and I classify them using:
on a column containing the speed with a colorramp.
As you can see in the screenshot, QGIS orders the labels random (6 - 15 - 30 - 65 - 45). 65 should come after 45. So I want to change the order of the labels by deleting them and adding them in the right position afterwards.
There is a delete button that deletes any value of the legend, but there is no "Add Value" button, so I can not Add any value.

The same counts for polygon layers.

Note: The error in the classification seems specific to GRASS (can´t repeat it with shapefiles), but the basic point is that It would be nice if you could change the order of legend items. This would be needed when classifying on a string field: classify on a text string (like one, two, three, for ...), the legend will classify "for - one - three - two". How can I change the order these items appear in my legend ...

Screenshot2010-05-31.png (65.3 kB) tdeleus -, 06/16/2010 01:26 pm

Associated revisions

Revision c4b74c9266d48bb864d4c424f87adc8fa940d9bf
Added by Radim Blazek over 4 years ago

Categorized vector GUI DnD and sorting, fixes #2816


Updated by Volker Fröhlich about 6 years ago

#2898 is somewhat related

Updated by Borys Jurgiel about 6 years ago

The button has been added in the meantime. The legend order can be set in the print composer.

The last remaining enchancement would be to allow moving the items up and down also in the Layer Properties and display that order in the Layers panel. Well, the latter should be also triggered when the items are resorted by click on the header (see #3322). I believe it is quite low priority, anyway.

Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

Updated by Giovanni Manghi about 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

Updated by Radim Blazek over 4 years ago

  • Status changed from Open to Closed

Updated by Radim Blazek over 4 years ago

  • Resolution set to fixed
  • Pull Request or Patch supplied set to No

Implemented drag and drop for selected row(s) and sorting by value (various data types like numbers etc. should be sorted correctly) and by label.

Work done by Faunalia for Agence de l'eau Adour Garonne.

Updated by Regis Haubourg over 4 years ago

Hi Radim, nice again, thx!
I couldn't sort legend for graduated numeric legends in revision 6bbe81bb. I reordered cliking on some columns headers, but order is not kept in legend once properties applied. Régis

Updated by Radim Blazek over 4 years ago

  • Status changed from Closed to Open
  • Assigned to changed from Martin Dobias to Radim Blazek
  • Priority changed from Low to Normal
  • Resolution deleted (fixed)

Graduated is another renderer. The two renderers do not share this code, the same must be implemented for graduated.

Updated by Radim Blazek over 4 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed

Drag and drop and sorting implemented also for graduated renderer in a1a1fb7be7.

Better drop indicator (line between items) and enabled drop under all items.

Also available in: Atom