Conditional formatting of attribute tables with QGis 2.12

Following innovations introduced by QGis version
2.12 : as in Excel tables, now
you
can
control
the cells setting of the attribute table
of a layer .

Now you can apply
conditional rules on the format implementation of
the attribute table. To this end , open the
attribute table of a layer
. On the right, you will see a new
button for the conditional setting.

Click
on the button to open
the formatting panel.

You can format
a particular
column or the entire line by selecting
Field or Complete Line . For the field, you
must
indicate
which
is
the field where you want to apply
a
format condition.

To include a formatting
rule, click the New Rule button . Then, you will
get
the conditional rule configuration panel:

You can enter
a
name, but for now, it is used nowhere
.

The @value variable
represents the value of the cell. You can
type directly a condition, for example
@value> 3.0 or
open
the
condition assistant by clicking on the button ε
.

As in all
the classic expressions in QGis, you can
refer to other fields of the table. Once the condition is entered
, you control the setting in
form
associated
with the lower panel :  

The drop-down menu presents
some
pre-established setting options.

You can control
the background colors and characters, add an icon
at
the beginning of the cell ( from the QGis characters ), and control the formatting
and the characters font.

For a single column you
can
enter
many
implementation
formatting rules. In the following example, the wave heights are
classified
in
three groups , each with a different formatting.. The column hour
is
classified
to put in evidence day and night .

Warning: the formatting is
saved in the QGis
project . If you
open the table in another project,
it is not taken into account.

Si cet article vous a intéressé et que vous pensez qu'il pourrait bénéficier à d'autres personnes, n'hésitez pas à le partager sur vos réseaux sociaux en utilisant les boutons ci-dessous. Votre partage est apprécié !

Leave a Reply

Your email address will not be published. Required fields are marked *