Conditional Formatting Reference¶
Observe offers a number of useful ways to quickly sort, filter, and visualize your data. When working with tabular data in a Worksheet or Log Explorer, you can use Conditional Formatting to apply color and style to string and numeric columns. This allows you to quickly visualize patterns in a data set.
How to Use Conditional Formatting¶
Open the context menu on a table column by right-clicking the header row. If the column is a string or numeric data type, the context menu will include an entry for Conditional formatting.
String data columns allow you to perform the following operations:
Color. Select an exact match, then use the icon to the left to set a color for that match. Click Add another to apply more conditional color rules. Use the Value Color Style radio buttons to change the presentation of colorized data.
Reformat. Add a prefix and/or a suffix to all strings in the column. Note this is only a reformatting of the data visualization. To alter the actual data, see replace-regex.
Figure 1 - Conditional Format a String
Numeric (int64 or float) columns allow you to change the formatting of the column or select a colorization scheme.
Format Style.
Decimal (the default) allows you to set the locale formatting for the column, select a notation style, and set a negative/positive sign display. For instance, if you need to work a physics problem such as the velocity and energy of a Swedish chef’s spoon flinging, you might set Locale to
Swedish Sweden (sv-SE)
, Notation toscientific
, and Sign Display toexceptZero
.Currency is for displaying financial values. You can set the locale formatting, specify the currency name, and alter its display. Be sure to perform any necessary conversion math in OPAL, as this tool is only doing formatting.
Unit formatting lets you select from pre-existing options such as weights, volumes, and data amounts, or enter a custom unit label. Custom units do not perform any math conversions on the data.
Figure 2 - Conditional Format a Number
Color Values.
Use None to remove colorization.
Range allows you to select a scale to apply automatically. Note that values outside the range will still be colorized as if they were at the extreme.
Sequential ranges are useful for data that represents relative points on a scale. For example, you might want a Hot or Not visualization using Fahrenheit degrees. You could set your lower bound is 0 and your upper bound to 100 and your color scale to Inferno, which will cause lower temperatures to be purple and higher temperatures to be yellow. A temperature of 220 degrees will display with the same formatting as a temperature of 100 degrees.
Diverging ranges are for data that represents opposing points, such as mutually exclusive choices. You can adjust the midpoint as well.
Thresholds are used to establish color bands. This is especially useful for metrics. The base color is used for anything below the first threshold. Add more thresholds to set colors in the middle of the set. Values above the highest threshold will be given its color.
Figure 3 - Conditional Format a Number’s Coloring
Where Conditional Formatting Can Be Used¶
Conditional formatting is available in the following tools:
In Log Explorer, the formatting is persisted in a session; sharing a URL or link should retain the formatting that has been applied. Starting a new session with the same data will remove the conditional format.
When a conditional format has been applied to a dataset and that dataset is exported to a Dashboard panel, the conditional format will still be applied in that Dashboard panel.