In edgeSuite versions 3.3 and higher, Rule Sets have been enhanced to support expressions. This allows for more complex rules that check values in multiple attributes using AND/OR operators.
Rule Sets are a collection of rules that are used to map values in the data to a visual presentation. Rule Sets are set up to be reusable across all Visualizations, specifically by renderers used inside of those Visualizations. It is the renderer’s job to apply these rules to the individual records that are being used by a Visualization. A sample Color Rule Set is shown below.
The Manage Rule Set page can be accessed through System Menu > Rule Sets, or by using the ruler icon located in the Admin toolbar on the left hand side of the screen.
The user interface shows all the Rule Sets in the system, and supplies some additional information about each one.
Modify an existing Rule Set.
Editing a Rule Set that is already used by renderers could adversely affect existing Visualizations.
Remove a Rule Set from the system.
If a rule is marked as in use, it cannot be deleted. Click on the in use note to see where it is being used.
When Adding or Editing a Rule Set, an administrator will use the same wizard. See the sections below for more information on each step.
This step provides important meta information about the Rule Set. All of these values are exposed in the Rule Set Manager.
Rule Set names are not required to be unique within the system. This means that naming convention can be important on larger deployments. For example, it’s possible to end up with multiple Rule Sets all named “Status”. That can make maintaining larger deployments challenging.
This property was added as of version 3.3 to help administrators provide additional information for a Rule Set. The description field can be used to help differentiate Rule Sets with the same name, or just provide some information on how the Rule Set is intended to be used.
Graphical mode uses a Graphical Expression Builder to enter rules. This is a safer option, and provides more validation.
Step 2: Variables
Each variable represents a unique data attribute used to drive the various rules within a Rule Set. Rule Sets can be reused across different datasets, so actual attribute names that contain values for the Rule Set are unimportant at this stage. The attribute names will be mapped into the Rule Set later on, when configuring a Renderer inside of a Visualization (see “Renderers” for more information).
While real attribute names are not required yet, it is important to have an understanding of the data that will be available in those attributes so variables can be typed correctly. Take a set of status icons for example – will the status values be represented by numbers or strings? Declaring variables on this step is very similar to declaring variables in most programming languages.
This is how the variable is referenced. It is what will be used within the individual rules on the next step.
This identifies the data type expected by the variable; String, Number, Boolean, or Date. This ensures that only attributes with valid data types are used to drive this rule.
Rules define the logic that map values in the data to a specific presentation. In edgeSuite versions 3.3 or higher, Rules support expressions that allow comparison of multiple attributes. New conditions can be added by clicking the ” + ” button.
Rule Sets are set up to work with specific Render Types, such as Color, Font, and Icon Renderers. The Renderer Type will affect the preview displayed at the top right of each rule (as shown below).
Cloning a Rule Set provides a way to copy the rule logic, and use it for a different renderer type. A complex set of rules written for an Icon Renderer, for example, can be cloned and then reused for a Text or Color Renderer.
Color rules will have a color swatch at the far right.
The following is an example of a Color Rule used to determine the background color of individual cells in a Table Visualization, representing “heat”.
Font rules will show a sample text string at the far right. This preview shows what the currently configured style looks like.
The following is an example of a Font Rule that alters text color based on an overall ranking.
Below is an illustration of the Font Rule Set (above) and the Color Rule Set (above) being used together inside of a Table Visualization’s cell renderer:
Icon rules will have an icon preview at the far right.
Note: Prior to edgeSuite version 3.3, Color Rules were included as part of an Icon Rule. When upgrading from earlier versions of edgeSuite, color will get split out of icon rules into turned into a Color Rule Set. The new Color Rule Set will be mapped to the new renderers automatically. This enhancement allows the color of an icon to be driven independently. This means that the attribute that determines color can be different from the one that determines what the icon should be.
Note: Color Rules only affect the stock SVG icons that ship with edgeSuite. Custom raster icons added to the system do not work with Color Rules at this time.
The following is an example of an Icon Rule Set that maps a president’s name (STRING) to a set of custom icons depicting presidents. See Custom Icons for more information on adding custom icons to edgeSuite.
The following is an example of an Icon Rule Set that evaluates multiple attributes as part of an expression. Because it uses an AND operator, all conditions must be true for the rule to be satisfied.
In the example above, you will only see the ” X ” icon (top right) in a Visualization when all three of the are conditions are met.