Conditional Formatting and Icon Sets

Conditional formatting offers another way to visualize your data in Lucidchart. Read on to learn how to add rules to your diagram that will highlight certain characteristics of your objects with stylistic elements and icons.


Suppose you have an org chart of your company, and some of your employees belong to teams that span across the hierarchical structure. For example, Noah Sims, Benjamin Fisher, and Jeremiah Fowler are all on the same SCRUM team, but each reports to a different manager. Using conditional formatting, we can visualize this by quickly color coding each team.

lucidchart conditional formatting org chart

Each of our employees has shape data with their team. For example, Jeremiah Fowler has Project Team = Press. We will use this data to set our conditional formatting rules.

lucidchart conditional formatting shape data

To start, select all the shapes to which you want to apply the rule and open the Conditional Formatting panel on the right by clicking on the wand icon:


Select Create New Rule:


We currently offer two types of conditional formatting: Shape Formatting and Icon Sets. The Shape Formatting option lets you set rules to change shape and line color, style, and width. The Icon Sets option lets you set rules to attach icons like checkmarks and warning signs to your shapes.
To color each team differently in our example, select Shape Formatting. We want to change the fill color of the shapes to green if their Project Team shape data has the value "Press." "In the "Format selection if…" section, change Text to Shape Data. In the "Enter shape data label" field, either select "Project Team" from the drop-down or type it in. In the third drop-down, select "Is equal to" and type in "Press" below it. In the "Shape Properties" section, change the fill color to green.


All of the shapes you originally selected that have Project Team equal to Press are now colored green. In this example, we’ve set Conditional Formatting rules based on shape data, but you can also create rules based on the text in shapes.

Clicking out of the Conditional Formatting panel will take you to the list of rules you’ve created.


The Rules list is broken into three sections: "Applied to Selection," "Applied to Some," and "Other Rules." If a rule is applied to every shape in your selection, that rule will appear in the "Applied to Selection" section. If a rule is applied to at least one but not to every shape in your selection, it will appear in the "Applied to Some" section. Finally, if a rule exists on the document but is not applied to any shape in your selection, it will appear in the "Other Rules" section. To apply an existing rule to your selection, drag rules from the panel to the "Applied to Selection" section or drag them directly onto the shape. To remove a rule, click on the three dots and select "Delete" from the menu.


You can change the name of a rule by double-clicking on its title or selecting "Rename" from the menu. To edit a rule, click on it and you will return to the rule editing panel.

In our example, we’ve colored all the shapes of the employees on the Press Project Team green. We would also like to color the Chart Project Team orange. To do this, select all the shapes, click on the three dots on the rule, and select "Duplicate" from the menu.

In the "Format selection if…" section, change "Press" to "Chart," and in the "Shape Properties" section, change the fill color from green to orange.


If you mess up, you can delete a rule by clicking on the trashcan icon in the header.


We now have an org chart where each shape is colored based on what team the employee is on.


Both of these rules appear in your rules list. Rules are applied to the shape from the bottom up. In other words, if two rules apply to the same shape, the rule that appears on the top will override all the rules beneath it. You can drag the rules around to reorder them.

Suppose it’s performance evaluation time, and all of our employees need to fill out their self assessment. We want to know which people have already submitted their review and if one team has been better at submitting their reviews than the other. That data is attached to each shape as "Finished Review" equal to "Y" or "N."

We can use the Icon Sets to add a red X to all employees that still need to fill out their assessments.

Again, start by selecting all the employee shapes and opening the Conditional Formatting panel. Click the "+ Rule" button to create a new rule.


This time, select "Icon Set" under "Formatting Type."

In the "Style" drop-down, there are eight different icon sets to choose from.


Choose one of the icon sets with a red X. You can set a different condition for each icon and drag to change the order in which they appear on the shape. However, in this example, we’re only interested in the red X, so underneath the other icons, select "Text" from the drop-down and change it to "Not Used"


For the red X icon, select "Not Used" from the drop-down and change it to "Shape data." Change the condition to "Finished Review" "Is equal to" to "N."


You can change the position of the icon on your shapes by clicking on the desired area in the position section.

Now we have an org chart that is colored by team and that easily identifies which employees still need to work on their performance reviews.


Using conditional formatting, we quickly see that two of the three Press team members have finished their reviews, but only one of the four Chart team members have.

Conditional formatting and icon sets are great ways to visualize multiple layers of data on one diagram. They can also be used to monitor the health of the systems in your diagram. For example, suppose you track the average downtime of your AWS instances in a Google Sheet, and you would like to visualize this on a diagram of your AWS infrastructure. You can link the rows of your spreadsheet to instances in your diagram and create conditional formatting rules that will display icons for various uptime percentages.



If the RDGW (7) instance were to dip below 100% uptime, Lucidchart would automatically change the green check icon to the yellow warning triangle or the red X. With data linking and conditional formatting, you can immediately visualize changes in your data.
When you use formulas with conditional formatting, the formulas can use just numbers or they can look at data anywhere on the document (attached in a datasource, on a shape, etc.)

Conditional formatting formulas are similar to shape data formulas in Lucidchart with one difference: statements in the conditional formatting area need to evaluate to either true or false.

For example, you might want to all shapes that have critical severity and are owned by you (Sally) to be blue. Below is a shape that has these properties and is an example of a shape that would be turned blue by the conditional formatting rule that is about to be created.


To create the rule, we would use an ‘AND’ formula which resolves to true if all of the given expressions are true. In this formula, we want the rule to apply if the property ‘Severity’ has the value ‘Critical’ (this.’Severity’=’Critical’) AND the property ‘Owner’ has the value ‘Sally’ (this.’Owner’=’Sally’).

Within shape data, the formula would look like =AND(this.’Severity’=’Critical’, this.’Owner’=’Sally’). However, within conditional formatting, no equal sign is necessary. So we would simply use: AND(this.’Severity’=’Critical’, this.’Owner’=’Sally’) (see screenshot below).


Now you can see that the shape which has critical severity and is owned by sally is blue, and those shapes whose severity/owner differ, are not blue.



Related Articles

Linking Lucidchart Diagrams to Spreadsheet Data
How to Use Formulas
UML Sequence Markup
Org Charts