Search Results

Adding color rules

By adding color rules, you can let the colors of specified items deviate from the ordinary coloring of the visualization items.

A color rule contains a condition and a color. All visualization items that fulfill the condition get the color you have specified. For example, you can add rules that let the top values, or values in a specified interval, stand out in a certain color. See some examples in Working with colors.

To specify conditions, different rule types are predefined. Which rule types are available depends on whether the column that is selected on the Color by axis contains categorical values or numerical values.

More than one color rule can be added to a visualization.

Procedure

  1. Right-click the visualization, and select Properties in the opened menu.
    The Properties pop-over is displayed.
  2. Click Color.
    The Color section is displayed.
  3. Make sure the column you want to color by is selected on the Color by axis.
  4. Click Add color rule.
    The Add color rule dialog is displayed. The dialog provides different rule types depending on whether the selected column on the Color by axis contains categorical values or numerical values.
  5. Select a Rule type in the drop-down menu.
    Different rule types require different inputs such as fixed values that you type, aggregations selected from the drop-down menu, or custom expressions. For example, in a Top rule, the input is how many top values should stand out.
  6. In the field below Rule type, specify the needed input using the drop-down menu or entering a value.
  7. Click the Color square to, from the displayed palette, select which color to use for the items fulfilling the rule.
  8. If you want, type a Display name for the added rule in the field.
    The display name is displayed in the legend. If you leave the field empty, the default rule type name is shown.
  9. Click OK.

Result

The color rule is applied to the visualization.
Note: More than one color rule can be added to a visualization. The most recent color rule is added on top of the others. However, the order in which the color rules are applied can be changed.

Example of color rule

In the scatter plot below, the markers represent how much money each customer spent at the electronics and toys departments in a store. The gradient coloring of the marker indicate the age of the customers.



Assume you want to examine the buying behavior among the oldest customers. By adding the Top color rule with 25 as input value, the markers representing the 25 oldest customers are distinguished.


Example of color rule

Note: In the scatter plot above, also the Drawing order is specified to Customer age to draw the lowest values first in the plot, and the highest values last. This means all the markers of interest in this particular example are drawn on top of the others, and therefore not hidden behind others.
Tip: Color rules can be part of color schemes. For example, the Top rule used above is in fact the Top n color scheme. The default n value in the color scheme though is 10, but it can be changed easily.