Introduction to rules

Whenever you want to constantly change the look and design of your presentation in Grunt, you will use rules. Rules that can either be simple, such as changing the font color, or more advanced such as displaying icons, charts, and shapes that are data-dependent and context-aware.

Benefits of working with rules

Grunt rules are dynamic, meaning that you can edit them, rearrange them or disable them, as your presentation evolves. Disabling all of them leaves you with your original raw data. You can also combine several rules, creating advanced visual presentations.

Underlying all of this is the fact that rules are separated from your data. While traditional formatting works in a static, destructive way, Grunt's separation of data and formatting, allows you to update your data without having to think of applying all the formatting over again. This also means that you never have to manually ensure that all of your formatting has been updated - changing the settings of a rule ensures that the updates are propagated everywhere the rule appears.

Using rules

Adding a rule

Start by selecting the part of your Grunt you want to change. Then either right-click and choose "Add rule" or use the shortcut key CTRL + Enter (worth memorizing as you will use it quite often).

A dialog box will then appear that contains all the rules available in the current context. There are lots of them, and you can scroll through the list to get a better feeling for what is there. If you know what rule you are looking for you can also search for it. Double-click on the rule you want to add.  


If you want to read more on a specific rule, we have separate articles describing each rule more closely

When a new rule is added, the rule settings dialog is automatically opened. Which settings that are available will vary from rule to rule.



Your rules are applied to different targets. In short, targets are the things that you can change using rules. The simplest way to choose a target is by selecting the cells you want to apply the rule to, then adding the rule. 

There are also more advanced forms of targeting, where not only cells, icons or text can be targeted, but also shapes, paragraphs, icons, labels and even other rules can be targeted. 

 Learn more about targeting here.


img The Rule Stack

The Rule Stack is where your design rules will show up when you start adding them. The important thing to remember with the Rule Stack is precisely that - a stack of rules. That means that when you add rules, you stack them on top of each other. Rules are applied by Grunt bottom-up so that rules further to the top may "overwrite" those further down.

This means that if two different rules affecting the same thing are applied to the same target, only the one further up in the rule stack will be visible. You can drag and drop rules in the stack to move them further up or down.


Sometimes you'll be changing the settings of a rule and nothing seems to change visually. This is usually because there is another rule higher in the stack that overrides the setting. Try selecting the cell or element in your Grunt to check which rules apply to that element. When selected, those rules that are targeting that specific thing will light up green in your rule stack.

The Stack also determines the order in which graphics show up in your Grunt.

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.