Skip to content

Handle categorical data, fix #68

Sebastien Peillet requested to merge spe-handle-categorical-data into master

Fix #68 (closed)

After latest configuration changes in !65 (merged), it is not possible to handle categorical data (my bad!). Indeed, with the new "display" attribute, it is possible to display one categorical data ('Cu' for example in the chemical analysis table), but then "display" attribute is set to 1 and no other categorical data can be added.

This MR fixes the problem.

As said by @delhomer, layer with categorical classes shouldn't be displayed with all category, so on one hand "display" attribute will always stay on 0 and on the other hand, i added a "displayed_cat" attributes to register classes to display in a list.

Configuration

The configuration dialog now allows to add a field of classes :

image

Add a categorical data

As the display attribute is always on 0, it's always possible to add a class. The class will be saved in "displayed_cat" list to be displayed.

Remove a categorical data

As the other plot, select it and use the remove button. It will remove the class from "displayed_cat" list.

Remove the configuration

As we display/hide classes with the add/remove buttons, the remove configuration dialog only allows to suppress the layer configuration, not only one class (so I removed the subclass combo box that is useless)

Merge request reports